Documentation Issues and Updates for Mobile SDK

Read about updates, corrections, and clarifications to the documentation released with Sybase Unwired Platform 2.1 ESD #2.

Issue NumberDescription
None
Do not compile and run the example projects

The following note was omitted from the prerequisites in the 2.1.2 Tutorials:

Do not try to compile and run the tutorial example projects posted in http://scn.sap.com/docs/DOC-8803#section2. They are meant only as code examples.

This applies to:
  • Tutorial: Android Object API Application Development
  • Tutorial: BlackBerry Object API Application Development
  • Tutorial: iOS Object API Application Development
  • Tutorial: Windows Mobile Object API Application Development
  • Tutorial: Mobile Workflow Package Development
NA2-1743
Corrected user authentication information

In the topic Logging In, the second paragraph incorrectly lists the startConnection method as an appropriate method for user authentication. The paragraph should read:

Authenticate the user for data synchronization by calling the generated database API beginOnlineLogin method.

This topic is found in:
  • Developer Guide: Android Object API Applications > Developing the Application Using the Object API > Initializing an Application > Initially Starting an Application
  • Developer Guide: BlackBerry Object API Applications > Developing the Application Using the Object API > Initializing an Application > Initially Starting an Application
  • Developer Guide: iOS Object API Applications > Developing the Application Using the Object API > Initializing an Application > Initially Starting an Application
  • Developer Guide: Windows and Windows Mobile Object API Applications > Developing the Application Using the Object API > Initializing an Application > Initially Starting an Application
CR 730839
REST Service endpoint does not support JSON

In the topic REST Web Services in Sybase Unwired WorkSpace - Mobile Business Object Development the statement:

"Supports resources with multiple representations (Transfer XML, JavaScript Object notation(JSON), or both)"

is not correct. The REST Service endpoint does not support JSON, so resources with multiple representations are not supported.

CR 716466
The topic Retrieving Information About Synchronization Groups does not apply to iOS

The topic Retrieving Information About Synchronization Groups in Developer Guide: iOS Object API Applications is not relevant to iOS.

CR 714445
DCN syntax and example use incorrect JSON format in user documentation.
References in the Developer Guide: Mobile Workflow Packages > Mobile Workflow DCN Without Payload topic are not valid JSON, because the data value is an object and should be an array, and there is an extra colon. For example, this syntax is incorrect:
 {”id”:””,”op”:”:”,”subject”:””,”to”:””,”from”:””,”read”:,”priority”:,
”body”:””, “data{}} 
And should be:
 {”id”:””,”op”:”:upsert”,”subject”:””,”to”:””,”from”:””, ”read”:,”priority”:, ”body”:””, 
”data”:[]} 
And this example:
{”id”:””,”op”:”:”,”subject”:”test”, ”to”:”test”,”from”:”test”,”read”:, 
”priority”:,”body”:” MATCH:SUP_MWF,TaskID:TS97200149, WIID:1470577, USER:PERF0111*#END#*”, "data”{}}
Should be:
 {”id”:””,”op”:”:upsert”,”subject”:”test”,”to”:”test”,”from”:”test”,”read”:, ”priority”:,
”body”:” MATCH:SUP_MWF,TaskID:TS97200149, WIID:1470577, USER:PERF0111*#END#*”,”data”:[]}
CR 709807
Updated result checker documentation.

Result checkers are now implemented through the OperationHandlerBase class, which replaces the ResultChecker class.

These topics have been added to Result Checkers in the Mobile Data Models: Using Mobile Business Objects 2.1 ESD #2.

CR 708703
SAPResultChecker information is missing from Sybase Unwired WorkSpace - Mobile Business Object Development and Mobile Data Models: Using Mobile Business Objects.
The following topics cover the missing information:
CR 705560
Updated parameter and synchronization documentation.
This change affects these topics in the Android, BlackBerry, iOS, and Windows and Windows Mobile Object API Applications Developer Guides:
  • Nonblocking Synchronization
  • Specifying Personalization Parameters
  • Specifying Synchronization Parameters

You must set and save both the personalization and synchronization parameters.

  • Add this information to Specifying Personalization Parameters and Specifying Synchronization Parameters.
    Note: If a synchronization parameter is mapped to a personalization parameter, no data is downloaded to the device until that mapped personalization parameter is set and saved."
  • In Nonblocking Synchronization, add this step 2, or modify the existing step 2 to include:

    If there are personalization parameters and synchronization parameters, set and save them before making the first full synchronize call.

    PersonalizationParameters pp = SUP101DB.getPersonalizationParameters(); pp.setPKCity( "New York" ); pp.save();
    CustomerSynchronizationParameters sp = Customer.getSynchronizationParameters(); sp.setCityname("Kansas City"); sp.save();
CR 702795
How Passwords Are Stored on a Device.

Best practices and security audits require you to know how passwords are stored on a device. The Sybase Unwired Platform environment using native object APIs does not automatically store passwords on a device. It does support you using a secure DataVault to store passwords or using an offlineLogin feature.

The DataVault API is the recommended feature to use a password to access the application's sensitive data on the device. To use DataVault, you first create the application, an encryption key, the database, and a DataVault. You then create the log-in screen and display it during application startup. It calls the DataVault API to validate the one password entry. You must enter the password to unlock the application and provide access to any on-device data.

DataVault stores sensitive data securely such as the encryption key used to encrypt/decrypt the on-device database and the user's password. With that one valid password, the Unwired Platform application retrieves the database encryption key from the DataVault and uses that to open the encrypted on-device database.

Create a DataVault using the Security APIs section of the Developer Guide for the device you are using.

The offlineLogin feature uses a username and password to access the on-device data. To use the feature, you first create the application, an encryption key, and the database. A hashcode of your password is computed and applied automatically the first time you synchronize the application. It is stored in the offlineLogin table. You then create the log-in screen and display it during application startup. It calls the offlineLogin API to validate the username and password entries. You must enter the credentials to unlock the application and provide access to any on-device data.

You can access the data locally without Unwired Server communications. You must know the Unwired Platform username and password to log in. If successful the process authenticates the current credentials against the last successfully authenticated credentials and provides access to the on-device data.

Note: The DataVault replaces the offlineLogin feature, which older applications may use to provide some security for on-device data.
CR 698385
Running multiple applications on iOS simulator is not supported.

This affects Testing Applications in the Developer Guide: iOS Object API Applications.

On a device, multiple applications are supported as expected (App1 uses App1 PIN and App2 uses App2 PIN after multiple launches); however, this multiple application support is not possible with the iOS simulator.

CR 697632

Incorrect path for Workflow Client files in tutorials.

In Tutorial: Mobile Workflow Package Development > Developing the Mobile Workflow Package > Installing the Mobile Workflow Package > Configuring the BlackBerry Simulator > Configuring the Mobile Workflow in the BlackBerry Simulator, step 4 gives the incorrect path for the Workflow client files.

The document states that they are located in C: Sybase\UnwiredPlatform\MobileSDK\ClientAPI\Workflow\BB; however, they are located in UnwiredPlatform_InstallDir\UnwiredPlatform\MobileSDK\HybridWeb\BB.

In Tutorial: Mobile Workflow Package Development > Developing the Mobile Workflow Package > Installing the Mobile Workflow Package > Configuring the Windows Mobile Emulator > Installing Sybase Messaging Runtime, step 5 gives the incorrect path for the SybaseMobileWorkflow.cab file.

The document states that the CAB file is located in: UnwiredPlatform_InstallDir\ClientAPI\Workflow\WM; however, the CAB file is located in UnwiredPlatform_InstallDir\UnwiredPlatform\MobileSDK\HybridWeb\WM.

CR 692374
The topic Synchronization Profile in Developer Guide: Windows and Windows Mobile Object API Applications > Client Object API Usage incorrectly states that compression is enabled by default. By default, compression is not enabled.
CR 691080
Adding local resources to a Mobile Workflow project.
When loading resources using custom JavaScript, be aware of the folder structure. Depending on localization, the structure and path to the local resource may be different. Possible folder paths include:
  • .../html/default/workflow.html
  • .../html/locale/workflow.html
  • .../html/workflow.html

Referencing custom resources in HTML elements requires the use of relative URLs. The parent directory may be the HTML directory, the root, or something else. There is no guarantee that the URL structure is always http://hostname/html/workflow.html. It is possible to copy the resources into each localization directory or reference the resources from one directory (paying attention to localization paths).

An example of a useful helper function to get the relative path to the HTML directory is:

/**
 * Returns relative URL to the html directory
 */
function getRelativeRoot()
{
   return ((resources != null) ? "../" : ""
}

// Helper function usage
var imageElement = document.getElementById("ImageElement");
imageElement.src = getRelativeRoot() + "images/myImage.gif";

This affects Mobile Workflow Development in the Developer Guide: Mobile Workflow Packages.

CR 674889
Apple Push Notification Service (APNS) Works on iPad Devices.
These topics incorrectly state that APNS cannot be used with iPad devices:
  • iOS Provisioning with APNS in System Administration
  • Apple Push Notification Service Configuration in OData SDK Developer Guide
None

Use a custom Java class to implement custom error checking.

See the topic Writing a Custom Result Checker.

None

Use OHLog to trap warnings but not halt execution of the result checker.

See the topic Result Checker Logging.

None
The Developing Applications in the Blackberry Development Environment topic in Developer Guide: OData SDK 2.1 ESD #2 incorrectly references APIs for Android applications.