GRDBDemoiOS
This application runs an universal (iPhone + iPad) application that displays an editable list of persons.
To manually integrate GRDB as a Framework in your iOS application:
-
Drag the GRDB project in your own project.
-
In the Build Phase tab of your target, add
GRDBiOSin the Target Dependencies section. -
In the Embedded Binaries section of the General tab of your target, add GRDB.xcodeproj/Products/GRDB.framework (iOS).
-
Run.
To see usage of GRDB, check the following files:
-
AppDelegate sets up a global dbQueue that is accessible in the whole application.
It uses migrations to initialize the database.
-
MasterViewController is responsible for displaying the list of persons in a table view, deleting persons, and present a person edition form.
-
Person is a simple Record subclass.
-
DetailViewController.swift and PersonEditionViewController.swift
Those two view controllers display and edit a Person, in total isolation from the database.