Note to self…

Although it has been repeated many times over the last 24 hours or so, I am saving it here to ensure I don’t forget:

Your time is limited, so don’t waste it living someone else’s life.
Don’t be trapped by dogma — which is living with the results of other people’s thinking.
Don’t let the noise of others’ opinions drown out your own inner voice.
And most important, have the courage to follow your heart and intuition.
They somehow already know what you truly want to become.
Everything else is secondary.

Steve Jobs
1955-2011

Using Apple AirPort Disk as iTunes media folder

The problem

For the best part of a year now I have been living in a US apartment away from my desktop computer, leaving me with my MacBook Pro as my only computer for work and media. I bought an Apple TV, which has since become my main device (along with Netflix streaming) for renting movies and watching movies or TV shows that I purchased from iTunes.

For a while now my iTunes media folder has been slowly but surely eating up all of the spare capacity on my MacBook Pro’s 200GB Hard Disk.  Music, apps and movies had taken their toll. The straw that broke the camel’s back was when I started downloading TV shows from iTunes. Before I knew it, my media folder was over 100GB, my HDD was full and I still had two and a half series of The Wire to download from iTunes. Finally, I couldn’t upgrade Xcode 4.

Something had to give!

I had looked at a number of different ways of moving my media folder off of the laptop. I had already moved my 60GB iPhoto library to a 1TB backup USB WD Passport Disk Drive but it was hassle to have to hook it up every time I wanted to use iPhoto, which is not nearly as often as I use iTunes. Dedicated NAS drives and media servers are expensive and take up room, which there isn’t a lot of in an apartment.  So I needed something small, fairly cheap and that didn’t need wires.

I did a bit of digging and noticed that the Airport Extreme Base Station has a USB port and a feature called AirPort Disk. AirPort Disk allows you to share Hard Disks over its zippy dual band 802.b/g/n network. However, Apple do not make any mention of specifically using it to host your iTunes media folder. In fact, when I went to my local Apple store, and explained what I wanted to do, the sales person had never even heard of AirPort Disk! I bought one on the understanding that I had 14 days to try it out and return it.  I plugged it into my LinkSys cable modem/wireless router, configured it in bridged mode and plugged my passport drive into the USB port. Sure enough, the disk appeared in finder as 2 shared disks on my network. I had partitioned the disk into two separate logical drives, one for media files and the other for TimeMachine backups.  The first test was to try using the iPhoto library on the disk and it worked without a hitch, though not quite as fast as when the library is located on the Mac.

Next up was to copy my entire 100GB+ media folder to the passport drive.  To do this I plugged it in directly and copied the files over. It took approx 1 hour to copy the files. Once the copy was complete, I unmounted the passport drive and plugged it into the Airport Extreme Base Station. I fired up iTunes, opened Preferences and changed the media folder location to point to the new location on the new mounted AirPort Disk volume. I restarted iTunes but all of the media was still pointing to the local media folder.  I renamed the folder (not wanting to delete anything in case it didn’t work) and restarted iTunes.  I looked at the location of my iTunes files and strangely enough, they now pointed to the local media folder with the new name!

In the end I finally decided to delete the entire local directory, safe in the knowledge that I had a backup on the passport drive as well as in Time Machine.  When I restarted iTunes, the files were finally pointing to the correct location on my shared volume.

The Big Test

Finally for the big test, watching a movie that was being streamed from my shared disk to my Mac via AirPort Disk and then from my Mac to the Apple TV using Apple’s AirPlay technology. At best it would probably buffer horribly and drop connection occasionally. At worst, I thought it would fail miserably.

The result?

It worked perfectly with almost no noticeable buffering!  Playing, pausing, forwarding and rewinding TV shows works without a hitch.  I have downloaded all the remaining TV shows from iTunes and have been happily watching TV shows streamed from the shared drive ever since.

Conclusion

I had been mainly worried about the speed of the USB drive for streaming 720p movies but I have been knocked out by how fast and reliable the connection and how good the performance has been.

So far there haven’t really been any real issues. Occasionally, I might need to establish the connection between the Mac and the shared disk through Finder or iTunes might complain that it can’t find the media. Not a deal breaker in my opinion.

I guess the biggest problem is backing up media on the wireless drive. I haven’t had a chance to play with Time Machine to see if it can back up shared drives, as my Time Machine is complaining that the latest backup is too big for the 400GB shared drive partition. Something that seems to happen quite regularly for me unfortunately. It is possible to connect a USB hub to the Airport Extreme meaning you could connect multiple disks for backup or extra capacity. You can even connect a USB printer and have it shared on the network. Though I don’t know what affect these would have on performance.

I am really pleased with the result and the added bonus of the faster 802.11n network that I now have being much faster than my old 802.11g network on the LinkSys modem. This allows me to download new media while streaming it to the Apple TV – something I wasn’t able to do with my 802.11g router.

You can even access your AirPort Extreme shared disk remotely via the Internet if you have a MobileMe account but I haven’t looked into that yet.

If you are in need of the space, it might be worth considering trying this but be warned: using AirPort Disk for iTunes is not officially supported by Apple so don’t blame me if it doesn’t work for you or stops working in the future. I have only tried it with a Mac, so I don’t know if it works with MS Windows iTunes software. Also be sure to make multiple regular backups of your media!!

Let me know if you have been using AirPort Disk for iTunes, if you know of any problems that I will likely run into or if you have a better way to store your iTunes media remotely.

#WWDC 2010 – 3 weeks to go

Wow! Where has the last year gone?! It seems like no time since I first posted about going to WWDC 2009.

I never got a chance to say just how much I enjoyed it last year. It was a great opportunity to learn a ton of stuff about Mac and iPhone development first hand from Apple engineers. The talks were excellent and well delivered, there was a real buzz around the place and the other developers were extremely friendly and helpful. And of course it was an opportunity to spend some time in one of my favourite cities.

It has also been a very interesting and busy year for me since then with Mobilizd. I have completed a number of iPhone projects and have some great iPhone and iPad projects in the works at the moment. I have also met and worked with lots of really cool and interesting people.

I am delighted to be going back again this year, even though it has been a bit of a nightmare getting everything sorted out at such short notice (WTF was that about Steve!?). In particular, I am looking forward to seeing the new iPhone 4G launch at Steve Jobs’ Keynote (hopefully), learning more about iPad app design & development, new SDK features such as Game Center and meeting up with lots of cool developers and of course the WWDC Bash in Yerba Buena Gardens!

So as part of my time honoured WWDC tradition, here is a picture I took in SF last year:

The Balclutha Tall Ship

The Balclutha, San Francisco Maritime National Historical Park

It’s Apple’s ball…

The Internet has been all a stir about Apple’s new  iPhone App Developer ToS clause (3.3.1) preventing developers from using 3rd party tools to generate native iPhone apps. Though, there still seems to be some confusion about what it is really preventing. While I can certainly understand people getting annoyed in terms of freedom and openness, as a developer I just don’t see the problem.

About a year ago, while developing an OpenGL/Physics game for the iPhone, I seriously considered using the Unity3D application which provides developers with the ability to develop cross platform games with built-in physics support. I actually had a working demo up in a short amount of time and I was impressed with the software, though the UI was a bit clunky.

However, I just did not feel comfortable about adding an unnecessary layer of software between myself and the iPhone OS. Not only would I have pay Unity for the privilege of using their software, I would not have direct access to the powerful frameworks that are provided by Apple. Further, iPhone OS 3.0 had just been released and I had no idea if/when Unity would add support for the great new features/APIs it created. Add to that the fact that I would have been tying myself to a company that I knew little about and at a time when companies are under serious financial strain, not knowing whether it would still be  supporting the iPhone or even in existence in the months and years to come.

As a developer with 10 years experience of Java, when I decided to begin working on iPhone apps, my first thoughts were about learning Objective-C and Cocoa Touch. Not to begin searching the Internet for Java based cross compilers. While I can see the advantages of using something like Unity, I don’t understand why developers want to write native iPhone apps in Flash or C#. To me it would be like working with one hand tied behind my back. Objective-C isn’t that hard, especially if you are an experienced developer. Look at it as an investment and an opportunity to expand your knowledge. The more you put in the more you get out. If you are lazy or aren’t willing to learn, then stick to writing Flash apps for the Internet and stop complaining.

I realise it will be a very sore point (and I do have some sympathy) for anyone who has already invested time and money in one of the banned platforms, but it was always going to be a risk. Apple were never going to let Adobe have it all their own way.

At the end of the day, we all signed up to Apple’s ToS to get in on the most compelling new software platform since the dawn of the Internet. Apple could have done things very differently, with exorbitant license fees or by only allowing specific partners to develop apps for their prize possession but by allowing anyone to develop an app (within reason), we have all prospered. If we want to play in their garden, we have to play by their rules. End of story…

As for the new features in iPhone OS 4.0:

  • Multi-tasking: is a great new feature, but the best thing about it is that we can now stop complaining about it being missing (much like Cut & Paste). Its a simple and elegant solution to a pretty complex problem.
  • Game Center: will be a great addition and is something I would definitely want to build into future games. Though that depends on the uptake of iPhone/iPod Touch/iPad users to the upgrade. I sincerely hope Apple give it away free to all users so that we can move forward as a single community and stop worrying about users running legacy OSs.
  • iAd: The new advertising platform is less exciting from a personal point of view but it makes sense to have a centralised ad platform for developers to take advantage of if they wish to do so.
  • Folders: The new ability to organise apps into folders. I have been looking for a feature like this for some time as my growing collection of apps becomes more unwieldy by the day. Thanks Apple!

With 85 million iPhone OS devices and the recent iPad launch, it is a great time to be an iPhone OS developer!

When designs go bad: iPod Shuffle 3G

iPod Shuffle 3G

I recently bought an iPod Shuffle 3G (3rd Generation) from the Apple Store to use while in the gym (I did try my iPhone 3GS first but after accidentally throwing it 6 feet in the air, I felt that it was better left in the gym locker).

I had wanted a shuffle for a while but the cost per GB seemed a bit steep. So when the 3G was released with a price reduction to £45 for the 4GB version, I jumped at the chance. Finally I wouldn’t have to listen to endless loops of Cascada and Dizzy Rascal on the jukebox! The main feature of the 3G Shuffle is the lack of volume/play controls on the device. All controls are now on a little switch on the earbud cable. They have a proprietary chip that make the player incompatible with regular earbuds. I know Apple earbuds aren’t the best but my iPhone ones work fine for me so it wasn’t a big issue.

On opening, it is a thing of beauty, simple and elegant, as you come to expect from Apple. I painstakingly created my “Gym Workout” playlist and copied it onto the shuffle. Off I went to the gym and everything was great. For the first hour that is. Then I noticed that the annoying computer voice kept interrupting my and telling my what playlist I was listening to. Again and again. It even interrupted itself! Then, the sound controls stopped working and eventually the main play/pause button stopped working. So off I went to see my local Apple Expert and he was happy to give me a new set of earbuds. The next day I took my new earbuds to the gym and within 20 minutes, they too had failed.

It seems pretty clear that the chip inside the earbuds doesn’t like moisture and is not well protected, which is not a good thing when the primary use of the player is for listening to music while exercising. A quick look around the Internet and its clear that I am not the only one with this problem. To make things worse, because of the proprietary earbud chips, there aren’t a lot of options. There are some accessories on the Apple Store that allow you to use regular earbuds such as the Scosche tapLINE extension lead and tapStick but they are relatively expensive and when added to a new set of earphones are more expensive that the Shuffle itself! I haven’t tested these yet so I don’t know if they are resistant to moisture.

It says a lot about a product when you have to spend more than the original cost to make it suitable for its task. I am afraid I have to give the iPod Shuffle 3G a big fat “F minus” and recommend anyone looking for an mp3 player for exercise to avoid it like the plague. Sort it out Apple!!

Howto: Use the Bullet 3D Physics Engine in Xcode

Its been a while since I added a Howto on here. Hope you find it useful.

The Bullet 3D Physics engine is shipped with the Oolong 3D Engine for iPhone. However, if you just want to use the physics engine in your iPhone app, the following steps should help you to integrate it into your project:

  1. Download Bullet. I got it as part of the Oolong Engine source from Google Code.
  2. Open Xcode Preferences, select Source Trees and add one with Setting Name “BULLET_ROOT” and Display Name “Bullet”. Give it the full path to your Bullet folder.
  3. In your Xcode project, CTRL+Click on Classes folder and select Add Group. Give it the name “Bullet”. Then CTRL+Click the Bullet group and select Get Info. Set the Path Type combo box to  ”Relative to Bullet”. The Full Path should show the full directory path for the Bullet folder.
  4. Select Project/Edit Project Settings from the Xcode menu. Search for “header search paths” in the Build tab and add the full path to your Bullet src. Make sure to check the Recursive checkbox. You will need to do this for Debug and Release build configurations.
  5. In your source code, include the relevant bullet header e.g.

    #include "btBulletDynamicsCommon.h"

    will include everything you need for rigid body dynamics.
  6. Check out the Oolong samples to see how to use the physics engine or head over to the Bullet website for more resources.

Hopefully, I haven’t missed anything out but let me know if you spot something incorrect or can’t get it to work.

Update: 21/07/09: One step I forgot to mention was that Bullet is written in C++. You iPhone application class files will default to Objective-C and so won’t be able to compile. You need to CTRL+Click the class file referrencing the btBulletDynamicsCommon.h header file, select Get Info and change its file type to be Objective-C++. That should allow it to compile properly.

WWDC – 3 weeks to go

Apple’s Worldwide Developer Conference takes place from 8-12 June in San Francisco. I am heading over as part of a 30 strong InvestNI delegation for my first Apple conference since converting from the Dark Side last year. Its going to be pretty intense with tons of information on iPhone and Mac application development! So with the miserable, wet and cold May we are experiencing at the moment, I thought I’d cheer myself up with a nice picture of the Golden Gate Bridge:

Golden Gate Bridge.

San Francisco is probably my favourite city. This will be my 3rd trip there (last time was my honeymoon in 2006) and I can’t wait to see it again! I’ll post some more pictures over the next few weeks…

Hands on with Sony’s Reader

At the start of the month, I wrote about the launch of Sony’s sexy new eBook Reader. I managed to get my hands on one of these for 5 minutes while in the US last week.

Its very slim and light, while still sturdy. Great for throwing into a bag when travelling. The display was really clear and very readable. The non-backlit display meant that it was very similar to reading a real book with very little strain on the eyes. There is no scrolling, so if you zoom in, it repaginates the book. There were 3 levels of zoom, the middle one I found to be the most readable. The only minor issue was the response lag, taking a second or two to respond to a page turn or go back to the menu. Its a slow transition too, with a fading effect from the previous page to the next. Though, once you are used to it, it doesn’t cause any major problems. I heard rumours that colour displays are not that far away, which would be a major bonus, especially for reading non-fiction books such as text books.

For my 2 cents, these things are going to have as big an impact as mp3 players did a few years back, maybe not this Christmas but definitely in the next year or two. The question is, are Apple going to get in on the act?

And I thought I was the only one…

From the BBC Editor Blog:

I have restrained myself to such an extent that I have not uttered a single word about the new iPhone in the last 36 hours, on TV, on radio or online. So, while I’m here, wasn’t it just a little disappointing? Still no video, the camera stays at the original 2mp, and no ability to cut and paste. And isn’t the price cut proof enough that Apple misjudged the European market, and needed to kick-start sales?

I couldn’t have put it better myself.