function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Mahesh SirmewarMahesh Sirmewar 

How to create salesforce offline app

How to create salesforce offline app which allow user to Offline access to Salesforce data also insert data off-line &  once client will online then data will automatically sync with salesforce.
Best Answer chosen by Mahesh Sirmewar
Gaurav KheterpalGaurav Kheterpal
P.S - This is a very broad question but I'll anyway provide some pointers to get you started.

You can use the Salesforce Mobile SDK and SmartSync framework to do so. Depending on the platform and development approach you may want to look at the following examples

Android Native (https://github.com/forcedotcom/SalesforceMobileSDK-android/tree/master/native/SampleApps/SmartSyncExplorer)
Android Hybrid (https://github.com/forcedotcom/SalesforceMobileSDK-Android/tree/master/hybrid/SampleApps/SimpleSync)
iOS Native (https://github.com/forcedotcom/SalesforceMobileSDK-iOS/tree/master/native/SampleApps/SmartSyncExplorer)
iOS Hybrid (https://github.com/forcedotcom/SalesforceMobileSDK-iOS/tree/master/hybrid/SampleApps/SimplySync)

The key is to look at the relevant classes

Native

Android class: com.salesforce.androidsdk.smartsync.manager.SyncManager iOS class: SFSmartSyncSyncManager

Hybrid

For hybrid, there are 2 ways (https://developer.salesforce.com/docs/atlas.en-us.mobile_sdk.meta/mobile_sdk/entity_framework_hybrid_using.htm) of doing this

com.salesforce.plugin.smartsync: The SmartSync plugin offers basic “sync up” and “sync down” functionality. This plugin exposes part of the native SmartSync library. Use this plugin in simpler syncing scenarios to sync large numbers of records rapidly in a native thread, rather than in the web view.

smartsync.js: The SmartSync JavaScript library provides a Force.SObject data framework for more complex syncing operations. This library is based on backbone.js, an open-source JavaScript framework that defines an extensible data modeling mechanism. To understand this technology, browse the examples and documentation at backbonejs.org.

If my answer helps resolve your query, please mark it as the 'Best Answer' & upvote it to benefit others and improve the overall quality of Discussion Forums.

Gaurav Kheterpal
Certified Force.com Developer| Salesforce Mobile Evangelist| Developer Forums Moderator| Dreamforce Speaker