Use Sybase Unwired WorkSpace to generate object API code containing mobile business object (MBO) references.
Develop the MBOs that will be referenced in the device applications you are developing. A mobile application project must contain at least one non-online MBO. You must have an active connection to the datasources to which the MBOs are bound.
From | Action |
---|---|
Mobile Application Diagram | Right-click within the Mobile Application Diagram and select Generate Code. |
WorkSpace Navigator | Right-click the Mobile Application project folder that contains the mobile objects for which you are generating API code, and select Generate Code. |
Option | Description |
---|---|
Language | Select Objective-C. |
Platform | Select the platform (
target device) for which the device client code is intended.
|
Unwired Server | Specify a default Unwired Server connection profile to which the generated code connects at runtime. |
Server domain | Choose the domain to which the generated code connects. By default, if you specified an Unwired Server to which you previously connected successfully, the first domain in the list is chosen. Accept this domain, or enter a different one. Note: This field is enabled only when an Unwired Server is selected.
|
Page size | Not enabled for Objective-C. |
Destination | Specify the destination of the generated device client files. Enter (or Browse) to a Project path or File system path (Mobile Application project) location, and select Generated Code as the destination. Select Clean up destination before code generation to clean up the destination folder before generating the device client files. |
If you select Java as the language, enter, or browse to the , which adds it to the project build path, and prevents errors after code generation. |
By default, the MBO source code and supporting documentation are generated in the project's Generated Code folder. The generated files are located in the <MBO_project_name> folder under the includes and src folders. The includes folder contains the header (*.h) files and the src folder contains the implementation (*.m) files.
Because there is no namespace concept in Objective-C, all generated code is prefixed with packagename. For example, "SampleApp".
Objective-C File | Description |
---|---|
MBO class (for example, SampleAppCustomer.h, SampleAppCustomer.m) | Include all the attributes, operations, object queries, and so on, defined in this MBO. |
synchronization parameter class (for example, SampleAppCustomerSynchronizationParameter.h, SampleAppCustomerSynchronizationParameter.m) | Include any synchronization parameters defined in this MBO. |
Key generator classes (for example, SampleAppKeyGenerator.h, SampleAppKeyGenerator.m) | Include generation of surrogate keys used to identify and track MBO instances and data. |
Personalization parameter classes (for example, SampleAppPersonalizationParameters.h, SampleAppPersonalizationParameters.m) | Include any defined personalization keys. |