IOS Workshop I: Make Open Data App with SQLite on iOS (second time)
Many thanks go to Michael Sanderson for giving such a great workshop!
-------------------------------------------
Meetup Announcement:
In this workshop, Michael Sanderson showed you how to make your first simplest iphone app using nyc open data.
Speaker:
Michael Sanderson first started programming for iPhone in 2011 as a hobby and now makes iOS apps full-time. He was a winner in May 2013 of the MTA/AT&T Hackathon, placing third with a team for the app AccessWay, which helps the blind and visually impaired get subway information.
Outline:
First, Michael explained a few things close to IOS app dev. Then it was individual hack time, so everyone could make sure all the codes run on your own Mac before they go.
Michael's speech covered the following points:
1) How to use Socrata to export data in CSV format.
2) How to use SQLite Manager to turn the CSV file into a SQLite database. SQLite Manager is a free manager that works through the Firefox browser, and so is available for all platforms, though only Macs can make iPhone apps. (https://addons.mozilla.org/en-us/firefox/addon/sqlite-manager/.) SQLite is an SQL version that's free and open-source and built into the iPhone. Edits and customizing of the database can also be done with SQLite manager, both with SQL directly and a graphical user interface.
3) How to load the SQLite database into an iPhone app project, add the frameworks and set up the header files. For the lesson, I show how to create a TableView, which is one of the most common kinds of iOS apps and has a template for Xcode.
4) How to get data from the SQLite database with specific code: This includes a) getting the database path and loading the database. b) preparing the sql statement to get the data you want in the order you want, c) "stepping" through the rows to put the data into variables, and d) "finalizing" the statement (necessary for performance reasons) and closing the database. These are simple steps that are easy to follow.
(Actually, because the SQLite steps are in the C language, anyone on any platform that uses SQLite can perform these steps.)
5) Actually part of step c) in number 4 -- how to create model objects to easily save the data from the table so that it can be easily retrieved, and how to do so to display it in a table.
Preparation:
Before you see more details about this workshop, it would be nice to consider:
1. To install Xcode (requires Mac, available on the Mac App Store, requires 10.7 and above)
2. To install SQLite Manager for Firefox (https://addons.mozilla.org/en-us/firefox/addon/sqlite-manager/)
-------------------------------------------
Other Useful Info Link:
Reference:
Start Developing iOS Apps, including sections "Setup," "Jump Right In," "Tools," "Language" and "App Design: Know the Core Objects of Your App"
http://developer.apple.com/library/ios/referencelibrary/GettingStarted/RoadMapiOS/index.html#//apple
_ref/doc/uid/TP40011343
"iOS App Programming Guide," especially the sections "App Design Basics" and "Core App Objects"
http://developer.apple.com/library/ios/#documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide
/AppDesignBasics/AppDesignBasics.html#//apple_ref/doc/uid/TP40007072-CH2-SW1
"Programming with Objective-C" especially "Types and Collections"
https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC
/Introduction/Introduction.html#//apple_ref/doc/uid/TP40011210-CH1-SW1