Including SQLite
Our initial work involves configuring our Xcode project with references to the SQLite library. The first step is to add a new framework to the project. NOTE This process is quite complicated in the Xcode 4 beta that I'm using it's possible that this will be made slightly easier in the production version. Refer to the web site if these steps seem to bear no relation to your edition of Xcode. In the Project Navigator, click on the project entry at the top of the tree. This is the blue box titled...
Sent Events
Touch Up Insice gt r.U s Om t i I buttonHello h . File's Owner New Referencing Outlet O Referencing Outlet Collections New Referencing Outlet Collection Figure 8-13. The Connections subpane for the button showing the binding to the handleClick method. The properties work in a similar way, but the other way around. If you select File's Owner and open the Connections subpane, you will see the properties marked as IBOutlet. Figure 8-14 shows our buttonHello property. Figure 8-14. The Connections...
Creating SBEntityType Instances
Before we can create instances of SBBookmark and use them, we need to be able to create an instance of SBEntityType that supports it. In more sophisticated ORM layers, it is commonplace to build the metadata up from some sort of decoration in the code e.g., attributes in .NET . In this implementation, we're going to build a class called SBRuntime and have it register the entity type on start. Here's the definition import lt Foundation Foundation.h gt
Building the View Engine
Structurally, the way we're supposed to build iOS applications is to create a single window and then swap views in and out of that window depending on what we want to do. To support this, we're going to have to create our own view engine. The design of the view engine that we'll build here is one that retains a pool of views in memory. When the application requires a view, it'll request one from the pool, creating one if one does not exist or recycling an existing view if it does. This sort of...
Logging On the User
Now that we have obtained a token to use and authenticated the API, we can actually log on the user. We've used the API service so far we're now going to use the Users service. If you click the User Logon link on the test harness, the URL will be rewritten to the following This URL is configured to call the Users REST service. If you replace the USERNAME and PASSWORD placeholders in that string, and assuming you have copied the token into the Token header field, and click Send Request, you'll...

