Specifying Synchronization Parameters

Use synchronization parameters within the mobile application to download filtered MBO data.

Assign the synchronization parameters of an MBO before a synchronization session. The next synchronize sends the updated synchronization parameters to the server. The SynchronizationParameters class is within the generated code for your project.

Note: If you do not save the SynchronizationParameters, no data is downloaded to the device even if there are default values set for those SynchronizationParameters. Call the save method for all SynchronizationParameters and for all MBOs when the application is first started. Do this after application registration and the first synchronization.
  1. Retrieve the synchronization parameters object from the MBO instance. For example, if you have an MBO named Customer, the synchronization parameters object is accessed as a public field and returned as a CustomerSynchronizationParameters object:
    CustomerSynchronizationParameters *sp = [Customer getSynchronizationParameters];
  2. Assign values to the synchronization parameter. For example, if the Customer MBO contains a parameter named cityname, assign the value to the CustomerSynchronizationParameters object's cityname field:
    sp.cityname = @"Kansas City";
  3. Save your changes by calling the synchronization parameters object's save method:
    [sp save];
    [SUP101SUP101DB synchronize];

    Once you have set the synchronization parameters, you do not need to set them again in subsequent synchronizations, unless you want to change them.

    Note: If you defined a default value or bound a PersonalizationParameters in the SynchronizationParameters, then that value will not take effect unless you call sp.save().
Related concepts
Synchronizing Applications
Related reference
Synchronization APIs