iOS 9 is here, and we’ve got a couple of tips for how to update your Mobile SDK apps.
If at all possible, you should update your app to Mobile SDK 3.3.1 (or later), and then apply the fix in Tip #1. If you’re unable to update at this time, you should implement both Tip #1 and Tip #2.
In iOS 9, Apple introduces an Application Transport Security feature for secure network connections. See https://developer.apple.com/library/ios/technotes/App-Transport-Security-Technote/ for a list of their requirements.
Salesforce servers use TLS 1.2 but do not yet support forward secrecy. Until they do, Mobile SDK apps need to disable the forward secrecy requirement. If you created your app with Mobile SDK 3.3.1 or later, you don’t need to change anything. If your app is based on Mobile SDK templates from a version earlier than 3.3.1, add the following configuration to your application plist:
To see these how we made these changes for Mobile SDK 3.3.1, check out https://github.com/forcedotcom/SalesforceMobileSDK-iOS/pull/1170.
iOS 9 introduces subtle behavior changes in the
unarchiveObjectWithFile: method of
NSKeyedUnarchiver. Due to these changes, users automatically get logged out after restarting any iOS Mobile SDK app built with Mobile SDK 3.3 or earlier. We’ve fixed this issue in the Mobile SDK 3.3.1 release. We urge all iOS developers to update to Mobile SDK 3.3.1 (or later). Otherwise, your application won’t behave properly on iOS 9 devices.
If for some reason you can’t upgrade to 3.3.1 (or later) at this time, you’ll need to edit the SDK source code and rebuild the SDK. Here are the details for manually addressing this issue:
unarchiveObjectWithFile: message of the
NSKeyedUnarchiver class now returns nil upon failure, instead of throwing an exception. You’ll need to update
SFUserAccountManager.m manually as shown here:
After making the change, rebuild the Mobile SDK libraries and then use them to rebuild your app.