The Salesforce Mobile SDK team is proud to announce the release of our next generation framework for creating native, hybrid, and pure HTML5 mobile apps. From the SDK’s inception, we consistently focused on providing the most productive tools for force.com developers that want to create highly customized mobile experiences driven by rich corporate data.
In the 2.0 release, we dramatically simplified the getting started process, enabling first time mobile developers to create connected apps with minimal effort. At the same time, advanced developers now have the flexibility to control the user authentication flow and to take advantage of their favorite mobile capabilities on the latest platforms.
Please take a look at the newly released a 163 page Mobile SDK 2.0 Developer Guide for the getting started instructions for iOS and Android, with in depth coverage over the new features.
Highly Flexible Mobile Architecture
- OAuth2 Authentication can now be handled on-demand, enabling mobile apps to start un-authenticated. With 2.0, developers can quickly connect existing apps to the wealth of customer data stored in the Salesforce cloud.
- Mobile Apps can now authenticate against standard force.com and community licenses, enabling our customers to realize the full benefits of being a “Customer Company” through mobile apps.
SmartSync Data Framework
- SmartSync can also seamlessly integrate into the SmartStore offline storage database for storing data offline without additional code – including the ability to defer updates with data conflict detection. Check out the new AccountEditor hybrid sample app, demonstrating the SmartSync functionality in action.
Simplified Getting Started Process with NPM
- Developers can quickly create apps with the Node Packaged Module (NPM) installers. Salesforce provides two packages: forceios for the iOS Mobile SDK, and forcedroid for the Android Mobile SDK. These packages provide a static snapshot of an SDK release. (npm install forceios and you are good to go.)
- Create new native and hybrid apps directly from the command line with a simple script. The 2.0 release provides a simple and unified app creating process for iOS and Android.
Node Package Libraries
Source Code on Github
- iOS: https://github.com/forcedotcom/SalesforceMobileSDK-iOS
- Android: https://github.com/forcedotcom/SalesforceMobileSDK-Android
In addition to the new major enhancements, we have also added the following features:
- Refresh tokens are now explicitly revoked from the server upon logout.
- Added support for community users to login.
- Consolidated our Cordova JS plugins and utility code into one file (cordova.force.js).
- Updated forcetk.js and renamed to forcetk.mobilesdk.js, to pull in the latest functionality from ForceTK and enhance its ability to work with the Mobile SDK authentication process.
- SmartStore now supports ‘Smart SQL’ queries, such as complex aggregate functions, JOINs, and any other SQL-type queries.
- NativeSqlAggregator is a new sample app to demonstrate usage of SmartStore within a native app to run Smart SQL queries, such as aggregate queries.
- SmartStore now supports three data types for index fields – ‘string’, ‘integer’, and ‘floating’.
- All projects and template apps have been converted to use ARC.
- All Xcode projects are now managed under a single workspace (SalesforceMobileSDK.xcworkspace). This allows for a few benefits:
- During development of the SDK, any changes to underlying libraries/projects will automatically be reflected in their consuming projects/applications.
- You can now debug all the way through the stack of dependencies, from a sample app down through authentication and other core functionality.
- No more “staging” of binary artifacts as a prerequisite to working with the projects. install.sh now simply syncs the sub-modules of the repository, after which you’re free to start working in the workspace.
- Native and mobile template apps no longer rely on parent app delegate classes to successfully leverage OAuth authentication. This means that you the developer are free to form up your AppDelegate app flow however you choose, leveraging the updated SFAuthenticationManager component wherever it’s practical to do so in your app.
- All hybrid dependencies are now decoupled from SalesforceHybridSDK.framework (which has been retired). Which means you can now mix and match your own versions of Cordova, openssl, etc., in your app. The core functionality of the framework itself has now been converted into a static library.
- Extending ForceApp or ForceAppWithSmartStore is no longer a requirement.
- Added SalesforceListActivity and SalesforceExpandableListActivity, that provides Salesforce wrappers around the standard ListActivity and ExpandableListActivity respectively.
- rest.xml has been removed and replaced with bootconfig.xml. Login options do not have to be supplied through code anymore, they can be specified in bootconfig.xml.
- Bootstrap flow for hybrid apps now occurs on the native side, thereby enabling faster initial load times (bootstrap.html is no longer required or used).
- Changed the package name of the SmartStore library, so that it can coexist with other library projects.