Documentation Issues and Updates for Sybase Mobile SDK

Read about updates, corrections, and clarifications to the documentation released with Sybase Unwired Platform Mobile SDK.

Issue #Description
SMPONP-10699
DataVault encryption algorithm is AES-128.

The statement "The contents of the data vault are strongly encrypted using AES-256" is incorrect. It should read "AES-128".

Applies to: Developer Guide: iOS Object API Applications > Client Object API Usage > Security APIs > SUPDataVault.

N/A
The Sybase Unwired Platform 2.2 SP05 documentation set contains only these updated collections:
  • Release Bulletin
  • Supported Hardware and Software
  • Developer Guide: iOS Object API Applications
  • Tutorial: iOS Object API Application Development

See the Sybase Unwired Platform 2.2 SP04 documentation set for any other documentation requirements, which are all applicable to Sybase Unwired Platform 2.2 SP05.

N/A

All tutorials, except for the iOS OAPI tutorial, were created using Sybase Unwired Platform 2.2.

Some tutorial steps could vary slightly when using Sybase Unwired Platform 2.2 SP05.

SMPONP-14026
Device incorrectly listed in Supported Hardware and Software Guide

The topics Apple iOS Versions for Object API andApple iOS Versions for HTML5/JS Hybrid Apps in Supported Hardware and Software Guide incorrectly list iPad with Retina Display and A5X chip on Apple iOS 6.0 as a tested device.

SMPONP-14023
New topics are added to Developer Guide: iOS Object API Applications

Two new topics, Background Refresh and Performing Background Synchronization are added to Developer Guide: iOS Object API Applications.

SMPONP-11750
Information about feature that allows iOS devices to disable encryption is added to Developer Guide: iOS Object API Applications

The topic Disabling Encryption for iOS Devices , is added to Developer Guide: iOS Object API Applications.

SMPONP-11517
The topic Save Operation in the Developer Guide: iOS/Windows Mobile/Android/BlackBerry Object API Applications needs to be updated. The topic introduction should read:

The save operation saves a record to the local database. In the case of an existing record, a save operation calls the update operation. If a record does not exist, the save operation creates a new record. If save is called on the parent MBO in an existing composite object, the save operation will also be called on all the child objects in the composite object.

SMPONP-11296
Code correction
The Technical Details for Developer Guide: OData SDK > Developing iOS Applications > OData SDK Components and APIs > SDMSupportability > SDMLogger shows the wrong code for retrieving all log messages. The correct code is:
[[SDMLogger instance] displayLogsWithLevel:DebugLoggingLevel forQueryOperation:GreaterEqual];
SMPONP-8653
HTTP requests are recommended for all purposes

The topic SDMConnectivity Public APIs, in Developer Guide: OData SDK, contains a sentence in the last paragraph before the protocols that states "However, for development and testing purposes you can use HTTP requests." Disregard that statement.

HTTP requests can be used for all purposes, not only development and testing. You can develop productive OData applications using HTTP requests.

SMPONP-6153
Only SUP 2.2 and later support REST Communication Channel use of HTTPS

The REST Services Applications topic in Developer Guide: REST API Applications incorrectly implies that versions of SUP before 2.2 can use the REST SDK and messaging channel libraries.

SMPONP-5423
Afaria does not support SCC in SUP

Disregard the topic Launching Afaria from Sybase Control Center in the System Administration guide.

SMPONP-2430
The Sybase Unwired WorkSpace - Mobile Business Object Development collection lacks a thorough description of the various operation cache policies.
Workaround: the supported operation cache policies and typical usages are:
  • Immediately update the cache with Apply merge of operation input/output – this can be used for CUD operations where the MBO attributes map one-to-one with corresponding values in the EIS (no EIS generated IDs or side-effects on MBO attributes). For example:
    1. The MBO Developer edits the Contact MBO officePhoneNumber attribute, and the Update operation requires Unwired Server to send fname, lname, city, state, and so on attributes that have not been changed on the client.
    2. Unwired Server recognizes that only officePhoneNumber has changed, and updates the cache correspondingly if the EIS operation executes without error.
  • (Legacy) Apply results to the cache – used primarily to support Create operations where the EIS generates the business ID for the new entity. Sybase Unwired Platform requires the EIS developer to provide a create method that returns all the attributes of the MBO that the Unwired Server normally sees from the read/load operation. This allows Unwired Server to insert the real business ID into the MBO instead of a temporary one manufactured on the client (generateKey) as a placeholder. When Unwired Server synchronizes the newly created MBO back to the client, it contains the real EIS defined ID field, and the client can update its remote copy by matching the surrogate key.
  • Immediately update the cache with Apply output of ENTITY READ operation – applies to any operation type, and also applies to graphs of related MBOs and shared read operations. For example:
    1. The MBO Developer wants to change the ShipDate attribute on the SalesOrder MBO for a customer in a SalesOrder -> LineItems object graph, then submit the Update operation.
    2. The EIS recognizes that due to product availability, some of the line items cannot be delivered on that date, so only some of the LineItem MBOs are modified as a result.
    3. Unwired Server recognizes that the Update operation succeeds (but this is the "normal" Update operation that has not been modified to actually return MBO values, much less the whole tree of SalesOrder->LineItem).
    4. Unwired Server recognizes an ENTITY READ operation associated with the Update operation takes the SalesOrder.ID as input and executes the entity read operation that returns the updated SalesOrder and LineItems information from the EIS.
    5. Using the shared read feature, Unwired Server updates the cache for both parent and child MBO values in the graph.
  • Invalidate the cache – the cache is unaffected in terms of what is in the cache database (CDB), but Unwired Server internally marks the cache partition to which the affected MBO belongs as invalid. The next time a client tries to synchronize values of this partition Unwired Server refreshes the cache by performing the load operation. If the cache is very finely partitioned, this can be the equivalent to the ENTITY READ approach: apply the operation and then perform an EIS read to update the cache. If the load operation takes a specific ID and returns a single MBO record, then these are equivalent. If the MBO partition is larger scale (Customer by State for example), then a lot of MBOs are invalidated and the cache refresh (all customers in State=CA) is a more expensive operation.
  • None – the cache is not updated after an operation. If there is a one hour refresh policy, changes are not reflected in the cache (or the device) until that hour expires and Unwired Server refreshes the cache. If the policy is DCN, the cache is not updated until the EIS sends a DCN message reflecting the changes.
SMPONP-1712
The topic Specifying Synchronization Parameters in Object API Developer Guides (Windows Mobile, BlackBerry, and Android) contains a step and note that should be ignored.
Workaround: Ignore:
  • Step 3 – You do not need to explicitly save synchronization parameter changes, as this is done when you add them, as described in step 2 of the topic.
  • This note
    Note: If you do not save the synchronization parameters, no data is downloaded to the device even if there are default values set for those synchronization parameters. Call the save method for all synchronization parameters and for all MBOs when the application is first started. Do this after application registration and the first synchronization.
RTC-370
The topic Setting Up the Connection Profile in the Object API Developer Guides for various platforms describes the write to the database while synchronizing feature, but is missing an example of how to use the “allowConcurrentWrite” ConnectionProfile named property.  
An application can have multiple threads writing to the database during synchronization by enabling the connection profile property, allowConcurrentWrite. Setting the property to "true" allows multiple threads to perform create, read, update, or delete operations at the same time in a package database. For example:
  • Android and BlackBerry
    SUP101DB.getConnectionProfile().setProperty("allowConcurrentWrite", "true"); 
  • iOS
    [ [SUP101DB getConnectionProfile]  setBoolean:@"allowConcurrentWrite"
          :YES]; 
  • WindowsMobile
    SUP101DB.GetConnectionProfile().SetProperty("allowConcurrentWrite", "true"); 
Note: Multiple threads are allowed to write to the database at the same time. However, there will be errors when multiple threads write to the same row of one MBO. Avoid writing to the same MBO row in your application.
RTC-339

The Troubleshooting Guide is lacking trace information for various Object API development platforms (Windows, Android, BlackBerry, and iOS).

Workaround: use tracing on the device side to trace Client Object API activity. Sybase Unwired Platform supports three levels of tracing:
  • 1 = Tracing is disabled
  • 3 = SQL Trace without payload
  • 5 = SQL Trace with payload (values displayed)
There are two ways to enable tracing on the client side:
  • Via Sybase Control Center through the Applications folders:
    1. Click on the Applications folder in the Sybase Unwired Platform Cluster frame.
    2. In the Applications tab, select the application you wish to enable tracing for.
    3. Select the Application Connections tab and select the user you wish to enable tracing for.
    4. Click on the Properties button to open the Application Connection Properties window.
    5. Click on Device Advanced to display advanced connection properties.
    6. Change the value of the Device Level Trace property to the appropriate level.
    7. Click OK to save your changes.
  • Via code by calling the appropriate API for your platform:
    • iOS – in the SUPConnectionProfile class, there are two APIs that can be used:
      - (void) enableTrace:(BOOL)enable
      - (void) enableTrace:(BOOL)enable withPayload:(BOOL)withPayload

      The application in the initialization code can invoke these APIs to enable/disable tracing:

      SUPConnectionProfile *cp = [SUP101SUP101DB getConnectionProfile];
      
      // To enable trace of client database operations (SQL statements, etc.)
      [cp enableTrace:YES];
      
      // To enable trace of client database operations with values also displayed
      [cp enableTrace:YES withPayload:YES];
      
      // To disable trace of client database operations
      [cp enableTrace:NO];
      
      // To enable trace of message headers sent to the server and received from the server
      // (this replaces the MBODebugLogger and MBODebugSettings used in earlier versions of SUP)
      [cp.syncProfile enableTrace:YES];
      
      // To enable trace of both message headers and content, including credentials
      [cp.syncProfile enableTrace:YES withPayload:YES];
      
      // To disable messaging trace
      [cp.syncProfile enableTrace:NO];
      
    • Android and BlackBerry – in the ConnectionProfile class, there are two APIs that can be used:
      - enableTrace(boolean enable)
      - enableTrace(boolean enable, boolean with Payload)

      The application in the initialization code can invoke these APIs to enable/disable tracing:

      ConnectionProfile *cp = SUP101DB.getConnectionProfile();
      
      // To enable trace of client database operations (SQL statements, etc.)
      cp enableTrace(true);
      
      // To enable trace of client database operations with values also displayed
      cp enableTrace(true, true);
      
      // To disable trace of client database operations
      cp enableTrace(false);
      
    • Windows and Windows Mobile – in the ConnectionProfile class, there are two APIs that can be used:
      - EnableTrace(bool enable)
      - EnableTrace(bool enable, bool withPayload)

      The application in the initialization code can invoke these APIs to enable/disable tracing:

      ConnectionProfile cp = SampleDB.GetConnectionProfile();
      
      // To enable trace of client database operations (SQL statements, etc.)
      cp.EnableTrace(true);
      
      // To enable trace of client database operations with values also displayed
      cp.EnableTrace(true, true);
      
      // To disable trace of client database operations
      cp.EnableTrace(false);
      
Note: Once the trace level is set, the application must be restarted for the tracing to take effect. SQL tracing (level 3 and 5) can cause significant performance degradation, so it should be used with caution. SQL tracing should only be enabled via Sybase Control Center long enough for the device application to capture relevant tracing. When finished, shut down and relaunch the application to run with tracing disabled.
RTC-308
The Developer Guide: Hybrid Apps, in the topic Customizing Generated Code, in Step 3, the line hwc.showAlertDialog("The connection type is " + navigator.network.connection.type + " and the platform and version is " + navigator.device.platform + " " + navigator.device.version);

should be:

hwc.showAlertDialog("The connection type is " + navigator.network.connection.type + " and the platform and version is " + device.platform + " " + device.version);

RTC-272

Information on troubleshooting slow queries was omitted from the Troubleshooting Guide .

A query may be slow because attributes of the MBO used in the query's where clause or join conditions are not indexed.

See Problems with a Slow Query included below.

RTC-269

The Developer Guide: iOS Object API Applications incorrectly documents the Metadata API class names.

The Developer Guide: iOS Object API Applications documents incorrect class names for the Metadata API. In code examples, the guide describes the SUPDatabaseMetaData and SUPClassMetaData classes. The correct classes are SUPDatabaseMetaDataRBS and SUPClassMetaDataRBS

See the generated API reference information provided with the Mobile SDK for more information on these classes.

CR-710930

Start-up of an application always gets HTTP callback errors.

During initialization, the client may try several URLs in an attempt to discover the correct path to the Unwired Platform server. During these attempts, 404 errors Page Not Found may occur and are reported to the OnHttpCommunicationError callback. This is expected behavior and you can safely ignore these initial 404 errors.

If the 404 errors continue to occur after successful registration of the application or if registration never completes, verify the UrlSuffix setting of the application's ConnectionProperties object.

CR-710608

onHttpCommunicationError returns an unexpected code.

In an environment configured for SiteMinder authentication, the expectation is that onHttpCommunicationError is called back for error condition 302. This condition is not currently fulfilled by the Windows and Windows Mobile platforms; instead, they return 404 errors.

CR-708259
The developer guides do not document all the methods in the ConnectionPropertyType class.

See the generated API reference information provided with the Mobile SDK for a complete list of methods in the ConnectionPropertyType class.