mobile SDK for iOS applications
Objective-C Swift JavaScript Ruby Python Shell C
Latest commit f5527b2 Jul 12, 2016 @bhariharan bhariharan committed on GitHub Merge pull request #1644 from bhariharan/master
Latest shared
Failed to load latest commit information.
.github Add ISSUE_TEMPLATE May 27, 2016
SalesforceMobileSDK.xcworkspace skip hybridsync tests Jun 16, 2016
build Adding react dependency in package.json for react native template Jun 16, 2016
configuration Fix compiler warnings Jun 2, 2016
external Latest shared Jul 12, 2016
hybrid Bumping up compatibility version of projects to Xcode 6.3 May 17, 2016
libs Fixing version numbers Jul 8, 2016
native/SampleApps Various native SmartSyncExplorer fixes: Jun 20, 2016
node Fixing version numbers Jul 9, 2016
shared add comments to localized string file to avoid appledoc command warning Jun 30, 2016
.gitignore Add to gitinore and npmignore May 27, 2016
.gitmodules Pod specs live in main repo - and are only copied to specs repo at re… Jan 8, 2016
.npmignore Add to gitinore and npmignore May 27, 2016
.travis.yml skip test_force.js as it's still unstable on travis_ci Jun 21, 2016 Updated license file Jul 28, 2015
SalesforceNetwork.podspec Merging back from master to unstable Feb 17, 2016
SalesforceReact.podspec Salesforce React pod spec changes - so that it works when app has use… Jun 22, 2016
SalesforceRestAPI.podspec Merging back from master to unstable Feb 18, 2016
SalesforceSDKCore.podspec CocoaLumberjack version updates for podspec May 25, 2016
SmartStore.podspec In the move to 3.4, we forgot to update podspec May 13, 2016
SmartSync.podspec Merging back from master to unstable Feb 18, 2016 Updating upgrade doc Jul 7, 2016 text adjustment Apr 29, 2013 More plist fixes Oct 30, 2015 Fixing forceios / prepublish / postpublish Aug 3, 2015
package.json Upgrade to latest shelljs May 26, 2016 What's New for 4.2 Jul 7, 2016

Build Status Mobile SDK for iOS

You have arrived at the source repository for the Salesforce Mobile SDK for iOS. Welcome! Starting with our 2.0 release, there are now three ways you can choose to work with the Mobile SDK:

  • If you'd like to work with the source code of the SDK itself, you've come to the right place! You can browse sample app source code and debug down through the layers to get a feel for how everything works under the covers. Read on for instructions on how to get started with the SDK in your development environment.
  • If you're just eager to start developing your own new application, the quickest way is to use our npm binary distribution package, called forceios, which is hosted on Getting started is as simple as installing the npm package and launching your template app. You'll find more details on the forceios package page.

Installation (do this first - really)

Working with this repository requires working with git. Any workflow that leaves you with a functioning git clone of this repository should set you up for success. Downloading the ZIP file from GitHub, on the other hand, is likely to put you at a dead end.

Setting up the repo

First, clone the repo:

  • Open the Terminal App
  • cd to the parent directory where the repo directory will live
  • git clone

After cloning the repo:

  • cd SalesforceMobileSDK-iOS
  • ./

This script pulls the submodule dependencies from GitHub, to finalize setup of the workspace. You can then work with the Mobile SDK by opening SalesforceMobileSDK.xcworkspace from Xcode.

See for information on generating binary distributions and app templates.

The Salesforce Mobile SDK for iOS requires iOS 8.0 or greater. The script checks for this, and aborts if the configured SDK version is incorrect. Building from the command line has been tested using ant 1.8. Older versions might work, but we recommend using the latest version of ant.

If you have problems building any of the projects, take a look at the online FAQ for troubleshooting tips.


What's New in 4.2

SmartStore Enhancements

  • FTS 5 is now supported.
  • We've added a new index type for JSON1.
  • We've added a new API to support deleting soup elements by specifying a query.
  • We've added a new optional parameter to our query APIs, called selectPaths.

SmartSync Enhancements

  • SmartSync now provides a cleanResyncGhosts method for removing ghost records, that is, records that don't match sync criteria or have been deleted from the server.

SalesforceReact Enhancements

  • SalesforceReact now supports deferred authentication.

Library Upgrades

  • We've updated React Native to version 0.27.2.
  • We've updated SQLCipher to version 3.4.

Other Technical Improvements

  • We're IPv6 compliant.
  • Improvements to sample apps.
  • Various bug fixes.

Check for additional articles and tutorials.

Native Applications

The Salesforce Mobile SDK provides the essential libraries for quickly building native mobile apps that interact with the Salesforce cloud platform. The OAuth2 library abstracts away the complexity of securely storing the refresh token or fetching a new session ID when it expires. The SDK also provides Objective-C wrappers for the Salesforce REST API, making it easy to retrieve and manipulate data.

Hybrid Applications

HTML5 is quickly emerging as a powerful technology for developing cross-platform mobile applications. While developers can create sophisticated apps with HTML5 and JavaScript alone, some vital limitations remain, specifically: session management and universal access to native device functionality like the camera, calendar and address book. The Salesforce Mobile Container (based on the industry-leading PhoneGap implementation) makes it possible to embed HTML5 apps stored on the device or delivered via Visualforce inside a thin native container, producing a hybrid application.

Application Templates

The Mobile SDK provides the means to generate your new app from a template, to quickly construct the foundation of native and hybrid applications. These apps come with a fully functioning demo app, as well as configurable Settings bundles that allow the user to log out of the app or switch between Production and Sandbox orgs. See for more information on how to generate and use the templates.

Native App Template For native apps that need to access the Salesforce REST API, create your app using the native template. The template includes a default AppDelegate implementation that you can customize to perform any app-specific interaction.

Hybrid App Template To create hybrid apps that use the Salesforce REST API or access Visualforce pages, create your app using the hybrid app template. By providing the SalesforceOAuthPlugin for our PhoneGap-based container, HTML5 applications can quickly leverage OAuth tokens directly from JavaScript calls. In addition, our SFSmartStorePlugin will allow you to store your app data securely on the device.



If you would like to make suggestions, have questions, or encounter any issues, we'd love to hear from you. Post any feedback you have on our Google+ community.