Invoking the Sync Up Method with a Custom Target

iOS: 

On a sync manager instance, call:

Swift

1func syncUp(target: SyncUpTarget,
2             options: SyncOptions,
3            soupName: String,
4            onUpdate: ()) -> SyncState

Here's an example:

1let syncState = syncManager.syncUp(target: target, options: options,
2    soupName: CONTACTS_SOUP, onUpdate: updateFunc)
Objective-C

1- (SFSyncState*)
2    syncUpWithTarget:(SFSyncUpTarget*)target
3         syncOptions:(SFSyncOptions*)options
4            soupName:(NSString*)soupName
5         updateBlock:
6              (SFSyncSyncManagerUpdateBlock)updateBlock;
Android:

On a SyncManager instance, call:

1SyncState syncUp(SyncUpTarget target,
2    SyncOptions options, String soupName,
3    SyncUpdateCallback callback);
Hybrid:

1cordova.require("com.salesforce.plugin.mobilesync").
2      syncUp(isGlobalStore, target, soupName,
3        options, successCB, errorCB);
4cordova.require("com.salesforce.plugin.mobilesync").
5      syncUp(storeConfig, target, soupName,
6        options, successCB, errorCB);

We've Moved

Welcome to the new home of the Mobile SDK Developer Guide! For now, the Japanese guide can be found in PDF form.