Tuesday, 30 November 2010

Chapter 3 complete, simple UI in place

Well that was Chapter 3 and, although I skipped the boring image flipping section (without a broadband connection I can't download the sample images, which is annoying), I'm now the proud owner of an app that programmatically creates the UI and allows me to click a button and have an alert displayed in response. All very simple but strangely satisfying and it's quite a relief to know that the UI can be created without recourse to the Interface Builder, which I find unexpectedly difficult.

Monday, 29 November 2010

A struggle with Outlets and Actions

New concepts are always tricky and it's taken me the best part of a couple of hours to get the hand (I think) of Outlets and Actions. The key to understanding is to grasp the logic behind the principles but that's easier said than done. The problem is that even though I made the exercise work (read a text field, reproduce the contents in an alert) I really had to fight - it took three attempts to get it to work properly and I'm not entirely certain what the problem was (I think I failed to build the initial view correctly, missing the View, which is fairly fundamental).

More reading tomorrow on the bus and, hopefully, the next exercise will go a little quicker.

Sunday, 28 November 2010

Hello World and other programming triumphs

It's taken rather longer than I'd hoped but I have now completed a "Hello World" application in the iPhone simulator. Along the way I've learnt a few things:
- cmd-Tab moves between applications, much as Ctrl-Tab does in Windows but, unlike Windows, minimised applications aren't restored - instead the menu is displayed at the top of the screen.
- Taking screen shots is a bit more involved. In Windows alt-PrintScreen does the trick but in Mac OS it's cmd-shift-4 (or one of half a dozen other combinations, depending on exactly what you're trying to achieve) after which you have to add your shot to the email. Versatile, but not exactly intuitive.

Buying a book definitely helped (I was struggling with Apple's tutorials; they're good, but all the iOS walkthroughs are online and I still don't have broadband). A quick trip to the local wifi-enabled cafe and I'm all sorted with the Kindle edition of Beginning iOS 4 Application Development by Wei-Meng Lee, which seems pretty good. I have to admit that it didn't even occur to me to try iBook - I went straight to Amazon.

Anyway, having done that, I now have a crappy Hello World app running (see below), which isn't too bad for a couple of hours work. I'm starting to get a feel for the .h, .m, .xib and other files required in iOS programming although I still don't have a good understanding of their purpose (when you write in assembler everything is held in a single file, possibly with "includes", and the whole things is much simpler to pick-up). More reading now follows (and I've synced the book to my iPhone so I can read it on the bus) then I'll be heading back to the code to stick some more things in my app.

First steps completed...

Ok, first admission; I'm not a complete novice when it comes to programming. I've never used Xcode so there's a lot of stuff to learn, but I did, at one point, support myself by writing embedded assembler code for Microchip PIC processors and I'm reasonably familiar with PHP.

First steps are complete. Under the guise of acquiring a new laptop for the wife (Christmas present) I've bought my first Mac, a 13" MacBook Air. Lacking broadband at home (long story; new flat, waiting for BT to install a phone line etc.) I downloaded the iOS SDK at work (all 3.8Gb of it), transferred it to my iPad and then, when I got home, to the new MacBook Air. The package has just finished installing so the next step is to give it a prod and see what drops out.

iPhone App Idea...

So here's the question. Is it possible for a complete novice, with no Mac, iOS or Apple programming experience, to get an iOS app into the App Store and to sell it for real cash? I've got a couple of ideas for simple apps that might be useful (to me, if nobody else) and my plan is to acquire a Mac, install the SDK, write and app and submit it to the App Store.

I'll blog each step and, if we're lucky, you'll end up with a first-hand account of the trials and tribulations of a novice iOS developer and (hopefully) a working, useful app and I'll be a published developer with at least one app on the Store. Might not happen, but you never know your luck and, at the very least, you can have a bit of a laugh at my struggles.