Code4PizzaCollator: The first push.

An excellent day of coding today as I spent the day hooking up the database storage to the iPhone.  This was all new to me but there’s some good documentation out there.  I used some sample code from Bill Dudney and Chris Adamson’s book “iPhone SDK Development” so I could get used to using SQLite (cos I’m a MySQL kinda guy).The most useful thing I learned today….. the way that the SDK will copy the SQLite database to a WHOLE new place.  Turns out the insert code was working fine I just didn’t know where it was going.

NSArray *searchPaths =


(NSDocumentDirectory, NSUserDomainMask, YES);

NSString *documentFolderPath = [searchPaths objectAtIndex: 0];

dbFilePath = [documentFolderPath stringByAppendingPathComponent:


NSLog(documentFolderPath); is your friend.So it’s all coming along nicely, the first commit went up to github this afternoon so other people can have a play with it (assuming that you’re all bored with the snow now).  The next job is to bundle up the saved locations and send them to a server (somewhere to be decided).  There’s plenty of resources on getting an iPhone app to pull JSON data in from a URL but not a lot about transmitting it.  This is going to be fun 🙂

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: