May 29, 2008

iPhone hybrid UIWebView applications can now use the SQLite database

Posted in iPhone development tagged , , , , , , at 10:17 pm by tetontech

It works! The latest beta (6) of the iPhone OS includes the ability to use the SQLite database from JavaScript. This is the last step required to begin to create standalone applications on the iPhone written completely in HTML, CSS, and JavaScript. These are not web applications. These are fully fledged applications in their own right. You no longer need to know how to write Objective-C in order to create standalone applications.

You can now store the current state of you application on exiting and restore it when the application is started up again. This will allow you to use the links that start the Calendar, Contacts, music, videos, etc. When such a link is selected you app is exited and the other one started. You then exit that app and start yours again. Prior to this database fix your application could not restore its’ state at startup.

The source code for the library that does this is to large to place here as an example but a followup posting will include an example of how to easily access and use the database functionality built into WebKit. If you go to the QuickConnectiPhone download you can get an Xcode and Dashcode project that includes sample code. They show how to interact with the database easily without knowing the unique requirements of SQLite.

for an explanation of these projects and what the QuickConnectiPhone framework is see my previous post.


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 )

Google+ photo

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

Connecting to %s

%d bloggers like this: