Generating Files for an Externally Developed Hybrid App

Use the JavaScript API Generation wizard to generate API files for a Hybrid App that uses an MBO as a data source.

Prerequisites
Whether you develop your Hybrid Apps using third-party tools or manually, you can use the JavaScript API to access the Mobile SDK container features:

To understand the overall process and how the JavaScript API generates code, read Generating JavaScript MBO Access API in Developer Guide: Hybrid Apps.

Task

To run the wizard:

  1. In WorkSpace Navigator, right-click the project and choose Generate Hybrid App API.
  2. Choose one or more MBOs to include in your application.
    The Dependencies box shows relationships detected between the MBOs you select.
  3. Specify the location using one of these options:
    • Generate into the project

      The files are generated in a project subfolder, Generated Hybrid App\APIs.

    • Generate to an external folder

      Specify a folder anywhere in your file system.

  4. Optionally, if your Hybrid App is server initiated, click Next to define a notification for the object query.
    1. In the Server-initiated Notification Configuration page, specify an object query to configure, and its associated MBO.
    2. If the query has input parameters, click Add to define one or more message transformation rules.
      Each rule extracts a parameter value from a field in the notification. For more information, see Notification Extraction Rules
  5. Click Finish.
Next
The wizard copies core API files from your installation to the generation folder you specify, and generates WorkflowClient.xml and HybridApp.js, which has the JavaScript functions for accessing the MBO operations and object queries. You can examine these files for detailed information about the API, and you can tailor them for your application.

The wizard does not deploy the application. To help you deploy it, Sybase Unwired Platform includes a packaging tool that automates much of the work. See Packaging Hybrid Apps Using the Packaging Tool in Developer Guide: Hybrid Apps for information about completing and deploying your application.