O'Reilly logo

iPhone Location Aware Apps by Example by Zeeshan Chawdhary

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action — storing and retrieving the user's location with SQLite

We use the Hello Location — Location update example from Chapter 3, Using Location in your iOS Apps — Core Location, to demonstrate the SQLite functionality.

  1. Open the Hello Location — Location update example, and add the SQLite library to your project. The library is named libsqlite3.0.dylib. Alternatively, you can include the libsqlite3.dylib library (which is a symbolic link to the libsqlite3.0.dylib library).
  2. In the Hello_LocationViewController.h file, we include the sqlite3 header by importing the sqlite3.h file as follows:
    #import <sqlite3.h>
    
  3. Next, we declare a variable database of type sqlite3, and a string to hold the full filename with the following path: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required