If you are a Salesforce mobile developer involved in building custom native/ hybrid mobile apps, a new version of Mobile SDK (3.1) came out late last month. If you’ve been using the Mobile SDK for a while, there are considerable improvements and significant changes that you should take note.
SDK 3.0.0 came out just 3 months ago so most developers are still coming up to speed with the changes and now we already have 3.1. This post focuses on the new aspects of 3.x releases for those coming from a Mobile SDK 2.x background. Read on to know more.
Let’s talk about the iOS SDK first. Note that your project structure has changed significantly.
Salesforce iOS SDK 3.1
A) Pods – Finally!!
First things first and I’ve to admit that I’ve always been a huge fan of Cocoapods and it’s rather disappointing that it took so long for Mobile SDK to get official pod support. Therefore, it was natural to have my eyes lit up with joy to see the Mobile SDK finally in the Cocoapods catalogue.
There are still open issues such as this one which I’ve faced as well but I strongly believe that some pods support is better than none.
B) Updated Cordova version
Traditionally, the Mobile SDK has been a bit behind the latest Cordova GA version and that’s understandable – it’s a sizeable amount of work to upgrade to each new Cordova version and ensure everything works well. It was good to see Mobile SDK 3.0 finally make the upgrade to Cordova 3.6.3. I am hoping the upgrade path to Cordova 4.0.0 happens sooner though!
One important point here – if you are still using Mobile SDK 2.x – please note that it links to an old Cordova version which does not support 64-bit architecture. As per Apple’s latest iOS developer guidelines
As we announced in October, beginning February 1, 2015 new iOS apps submitted to the App Store must include 64-bit support and be built with the iOS 8 SDK. Beginning June 1, 2015 app updates will also need to follow the same requirements. To enable 64-bit in your project, we recommend using the default Xcode build setting of “Standard architectures” to build a single binary with both 32-bit and 64-bit code.
Therefore, if you submit an app built with older Mobile SDK (2.x) to App Store, it will be rejected by Apple.
There is no doubt that offline is perhaps one of the most popular use case for developing hybrid Salesforce mobile apps. 3.0 introduced a new SmartSync library and there’s a new SmartSync plugin which claims to avoid re-inventing the wheel and make your offline logic much simpler. I’m yet to try this out though.
Salesforce Android SDK 3.1
A) Gradle/ Android Studio support
I moved from using Eclipse to Android Studio about 3 months back and haven’t looked back since then. Mobile SDK 3.0 brought about the much needed support for Gradle and now you are able to open/run your Android SDK projects in Android Studio. No more eclipsing around – at least for me 😉
B) Minimum Android Version support
3.x has raised the minimum baseline Android version to API level 17 – Android 4.4.2 If you are still supporting older versions, now is a good time to upgrade.
I hope to publish some more posts/ tutorials on the new aspects of SDK 3.0 soon. Stay tuned!
If you face any queries upgrading your projects to Mobile SDK 3.1, leave me a comment or post to either the Mobile SDK Google+ community page, Stack Exchange or Discussion Forums and I’ll be happy to help out!