Posts

Deploying the iOS Device Application with Sybase Unwired Platform

Image
Deploy the SUP101 application to the iPhone simulator for testing. Prerequisites Register an application connection in Sybase Control Center.You must be connected to the server where the mobile application project is deployed. Task From the top menu, select Product > Edit Scheme to iPhone 6.0 Simulator . Select Product > Build then Product > Run to build the project and start the iPhone simulator. In the iPhone applications screen, open the SUP101 application. When you run the application for the first time, it exits immediately with a dialog asking you to enter the application settings in the Settings application. In the iPhone simulator, go to Settings > SUP101 to enter the connection settings. SUP Server – the machine that hosts the server where the SUP101 mobile application project is deployed. SUP Server Port – ...

Creating the User Interface for iOS to work with Sybase Unwired Platform

Use Interface Builder to create and configure the user interface for the SUP101 application. The SUP101 iOS Object API example project contains the source code for the user interface for the sample application. Although the user interface is built automatically when you add the source files to the Xcode project, you can walk through the rest of the tasks and view the source code to see how to use Interface Builder to build the sample application. Viewing the SubscribeController View Controller A view controller functions as the root view screen for the SUP101 mobile application. Creating the MenuListController Create the menu list view. Creating the CustomerListController Create the customer list view. Adding the DetailController and Configuring the View Create the DetailController.xib.

Adding the DetailController and Configuring the View

Image
Create the DetailController.xib . The detail controller view displays information about a single customer in the client database. The source files you added from the SUP101 iOS Object API example project contain the DetailController.h , DetailController.m , and DetailController.xib files that create the customer detail view. This file also supports creating a new customer or deleting an existing customer. To create these files manually in Xcode, you would create a new file using the UIViewController subclass template, then indicate it is a subclass of UIViewController . Select With XIB for user interface .Although the provided XIB file is already configured, you can walk through the steps to see how to create the interface. Click the DetailController.xib file to open Interface Builder. Select View > Utilities > Object Library . In the Object ...

Creating the CustomerListController

Create the customer list view. The source files you added from the SUP101 iOS Object API example project contain the CustomerListController.h , CustomerListController.m , and CustomerListController.xib files which create the customer list view. To create these files manually in Xcode, create a new file using the UIViewController subclass template, then indicate it is a subclass of UITableViewController . Select With XIB for user interface . View the CustomerListController.h file. View the CustomerListController.m file. CustomerListController.m is a table view controller that displays the customer data in the client database. The viewWillAppear method uses the Object API to query the database for a list of all Customer objects, and builds an NSArray that is used by this class as the datasource for displaying the ...

Creating the MenuListController

Create the menu list view. The source files you added from the SUP101 iOS Object API example project contain the MenuListController.h , MenuListController.m , and MenuListController.xib files that create the menu list view. To create these files manually in Xcode, create a new file using the UIViewController subclass template, then indicate it is a subclass of UITableViewController . Select With XIB for user interface . View the MenuListController.h file. View the MenuListController.m file. MenuListController.m is a table view controller that displays two menu items: List and Create. Tap a row to move to the corresponding screen.

Viewing the SubscribeController View Controller

A view controller functions as the root view screen for the SUP101 mobile application. When you create the user interface, you assign a target action to a control object—in this example a, Subscribe button that sends a message (the action) another object (the target) in response to a user event, for example, a touch on the button. The view controller manages and configures the view. In Xcode, you can create the view controller by creating a new file using the UIViewController subclass. Select With XIB for user interface . Xcode creates the corresponding .h , .m , and .xib files. In the SUP101 Xcode project, click SubscribeController.m to view the logic for the view controller. Click SubscribeController.h to view the header file. Viewing the SUP101Appdelegate Files The SUP101Appdelegate.h and SUP101Appdelegate.m files are created when you create the Xcode project...

Making Connections

Image
Add Navigation Controllers to MainWindow_iPhone.xib and MainWindow_iPad.xib , and create a connection from the AppDelegate to the Navigation Controller. In the left pane, under the iPhone folder, click the MainWindow_iPhone.xib file. If you do not see the Navigation Controller in the middle pane, drag it from Objects to the middle pane: Under Objects in the middle pane, Ctrl-drag from the AppDelegate icon to the Navigation Controller icon to create a navController outlet. Click the expansion arrow at the bottom of the middle pane to switch to list view, select Navigation Controller > View Controller , and in the Identity Inspector, select SubscribeController in the Class field. Once the class is selected, the ViewController name in the hierarchy changes to SubscribeController and the connection from the AppDelegate to the Navigation Controller is created. ...