Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.

Using the Mobile Sync Plugin

Beginning with Mobile SDK 3.0, the Mobile Sync plug-in provides JavaScript access to the native Mobile Sync library’s “sync up” and “sync down” functionality. As a result, performance-intensive operations—network negotiations, parsing, SmartStore management—run on native threads that do not affect web view operations.

Adding the Mobile Sync plug-in to your hybrid project is a function of the Mobile SDK npm scripts:
  • For forceios version 3.0 or later, the plug-in is automatically included.
  • For forcedroid version 3.0 or later, answer “yes” when asked if you want to use SmartStore.
If you’re adding the Mobile Sync plug-in to an existing hybrid app, it’s best to re-create the app using the latest version of forcedroid or forceios. When the new app is ready, copy your custom HTML, CSS, and JavaScript files from your old project into the new project.