Deploying the Device Application

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
  1. In the upper-left corner of Xcode, make sure that the Scheme is set to SUP101 | iPhone 5.0 Simulator.

    SUP101 | iPhone 5.0 Simulator Scheme
  2. Select Product > Build and then Product > Run
    The project is built and the iPhone simulator starts.
  3. 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. These settings include the server name, port number, Sybase Unwired Platform user name, and other settings.
  4. 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 – Unwired Server port number. The default is 5001.
    • Farm ID – the company ID you entered when you registered the device in Sybase Control Center, in this case, 0.
    • SUP Username – the user to be authenticated, supAdmin.

    iPhone Simulator - SUP101 Connection Settings

    If the "Manual registration" switch is set to "Off", the application will attempt to perform an automatic registration, creating an application registration with the same name as the SUP Username ("supAdmin" in this example). This feature allows a client with a valid SUP username and password to connect and register with the server without a need for a manual registration to be created in advance.

    If the "Manual registration" switch is set to "On", then the connection name and activation code need to be filled in, and must match an application connection that has already been created in Sybase Control Center (see Register an application connection in Sybase Control Center).

  5. In the iPhone applications screen, reopen the SUP101 application.
    You are prompted for a PIN to use to securely store your Sybase Unwired Platform password, and a database encryption key that is generated when the application launches. For subsequent launches of the application, only the PIN is required.
  6. Enter a PIN, and enter the password for the SUP username that was entered in step 4.
  7. Click Synchronization.
    The menu appears.
  8. Click List.
    The customer list appears.
  9. Select a customer record from the customer list and double-click to open the detail view.
    The customer detail shows the fields: First Name, Last Name, and Phone.
  10. Change the First Name to something else, and click Update.