Well, it has been a few weeks since the last update. In the intervening time, I have descended deeper into the Apple labyrinth with the procurement of an iPad (with my lovely wife as an accomplice) and shelled out to join the Apple iOS Developer programme (More on that in future posts). However, where we left the story was a bit further back through the sands of time – having secured myself a Mac running Snow Leopard to host my sparkly new development environment….
First things first – I needed to get my mits on the iOS Software Development Kit (SDK) – which, remarkably, is free and includes the Xcode IDE (Integrated Development Environment – the thing you use to write the code). You can get it from here yourself if you don’t believe me: http://developer.apple.com/devcenter/ios/index.action. Of course, before you can get it, you need to register as an Apple developer – ahhh the subtlety as you slip in to the snare… But once registered, it’s free to download.
Actually, it’s only kind of free. Well, it is and it isn’t. That is to say, it’s free in so far as saying yes to the license terms and conditions. I carefully read them, reviewed the finer points with legal council and submitted a Judicial review in the High Court to get a definitive position on the “forfeiture of soul” clause.
Where it’s not so kind of free is that although you can write and compile code for the iPhone simulator that they so nicely provide as part of the SDK, you can’t actually install the results on an actual iPhone. Not yet anyway. For that you need to buy in to the iOS developer programme (see above). Ah ha! The trap is sprung!
But that’s OK – fair dues – for my first outing, all I wanted to do was to do the obligatory “Hello World” app, compile it up and run it on the simulator. Easy peasy, lemon squeezy.
Somehow, in navigating the Apple developer web site, I managed to sail straight past the “Hello World” app – and landed myself the sample “MoveMe” app. The ironic thing is that in writing this blog update I came across it straight away and had to really look hard for MoveMe. So I took the scenic route the first time – is that a crime or something? It is? Oops. I plead insanity.
Anyway – downloaded the sample code and unpacked it in the downloads area of my Mac. I really must put these things in a more sensible place – but hey ho. Fired up Xcode and pointed it at the sample code. Clicked on “Build and Go” – and before I knew what had happened a simulator iPhone pops up and there is the app.
As an app, it’s not all that exciting – a button that flashes the word “Welcome” for a split second flash frame (conspiracy theorists take note). You can then drag the button around the screen and when you let go – it goes boinnnggg back to the centre of the screen.
Hang on a minute – now I come to think of it, there wasn’t very much in the way of actual coding going on there. Not exactly a very fair hello world test, is it? I can hear the mocking voices of the Program Police mock my attempts by mockingly saying things that are mocking. But “Pah!” I say (more in a kind of off hand east coast way rather than the French version which includes a semi shrug) – there may not have been much in the way of coding – but this proves that my development environment works, doesn’t it? Lost for words now, aren’t you, mock cop?
So there we have it – a redefinition of success for the Hello World app … that wasn’t even the hello world app in the first place. Of course the real test of the development environment would be to get the app on to my iPhone. Now that would be clever, that would be a real achievement and that would set me back £59…