We’re so excited to share that the latest version of Mobile SDK is now available! Mobile SDK 11 is focused on authentication improvements for your end users. Regardless of whether you’re building iOS apps, Android apps, or cross-platform apps, you and your end users will love the enhancements in this release.

In this blog post, we’ll walk through key features of 11.0, such as biometric authentication and multi-app single sign-on. This release also introduces web server flow as the default authentication flow. In 11.1, we’re including support for the latest versions of iOS and Android to ensure that you can provide your users with the most modern technology available. We’re also introducing Swift Package Manager support in 11.1.

Biometric authentication

The image shows the login pages of the Salesforce Mobile app for iOS and Android while the user is authenticating via biometrics.

Biometric authentication lets users unlock apps quickly and with minimal manual effort. It keeps your apps secure by blocking API calls until the user successfully unlocks the app with biometrics.

Here’s an overview of the biometric authentication user experience:

  1. When the user logs into your mobile app for the first time, they will enter their username and password. Under the hood, the app creates a refresh token for them.
  2. The user opts into using biometric authentication for app unlocks in the future. Under the hood, the `optIn` parameter is set to `True`.
  3. When the user’s session expires, the app uses their refresh token to unlock the app using biometrics. No manual entry of username or password is required.

The user won’t need to enter their username or password again as long as that refresh token is valid. There are a few scenarios in which the refresh token would no longer be valid — for example, after user-requested logout or when authenticating from a new device for the first time. 

At a high level, you can implement biometric authentication in your app in three simple steps:

  1. Enable biometric authentication in your connected app: This step involves adding a custom attribute called “ENABLE_BIOMETRIC_AUTHENTICATION” in your connected app settings. The value of this attribute can be set to any string.
  2. Implement biometric authentication in your code: A basic implementation only requires a few lines of code, which you can grab from our documentation.
  3. Platform-specific steps: The platform you are building on may require one additional step. For example, on iOS you will have to add a string to your `info.plist` file that describes your use of FaceID.

To read more about implementing biometric authentication, see our documentation or watch our biometric authentication tutorial video on YouTube

In terms of user interface, you as the app developer get control over how the option to enable biometric authentication is presented to the user. For guidance, Mobile SDK provides sample applications with user interfaces that you can use. These sample apps are available in our Mobile SDK Android and iOS GitHub repositories.

In addition to this new biometric authentication feature, Mobile SDK also offers an older screen lock feature. Screen lock is an optional lock screen that can be added to Mobile SDK apps as an extra layer of security and unlocked with biometrics. This feature is similar to biometric authentication since both features allow users to unlock the app using biometrics. The main difference is that the screen lock feature is presented to the user as a lock screen, while this new biometric authentication feature presents a login screen. Many users prefer this new user experience over that of its predecessor because it better conveys that the user gets to “skip” a manual login.

Multi-app SSO

Some of our Mobile SDK customers have built 50+ mobile apps using Mobile SDK. As you can imagine, if their users had to sign into each one of those apps individually, it would be an incredibly tedious process.

Mobile SDK 11.0 introduces reworked multi-app SSO flows and configurations with identity providers. This means that if you have built multiple apps using Mobile SDK, then you can enable your users to log into one of them and be automatically signed into all of your Mobile SDK apps. 

As the app developer, you implement multi-app SSO by making one of your apps the identity provider (IDP) of others. The steps to implement multi-app SSO vary slightly depending on the platform you are building on. More information about how to set up multi-app SSO is available in our documentation.

Web server flow

For both iOS and Android, authentication now uses the web server flow by default. In contrast to the user-agent flow, web server flows never expose tokens in login URLs, and the app never directly handles user credentials. Ultimately, the Mobile SDK 11.0 update means that mobile app authentication is now even more secure for your users.

Support for Swift Package Manager

Also in 11.1, Mobile SDK introduces Swift Package Manager (SPM) support on iOS, which means that you can now bring Mobile SDK into your existing Swift applications. Binary frameworks for Mobile SDK are now hosted on a new repository, so that you as the developer can use SPM to easily switch to newer Mobile SDK versions as we release them. We also added a new template called `iOSNativeSwiftPackageManager` that demonstrates how to pull dependencies through SPM. For more information, see our documentation on adding Mobile SDK libraries to your project.

Updated iOS and Android support

In September 2023, Apple released iOS 17 and Android released Android 14. Soon after that, Mobile SDK released 11.1 in support of the latest versions of both operating systems, which means that you can continue to deliver the most modern apps possible on both Android and iOS. Mobile SDK has been thoroughly tested for compatibility with iOS 17, XCode 15, and Android 14.

Conclusion

Overall, Mobile SDK 11.0 makes user authentication easier and enhances app security. Biometric authentication and multi-app SSO simplify authentication for your users while maintaining high-security standards. These features, combined with the shift to web server flow as the default authentication method, boost security without compromising user convenience.

Mobile SDK 11.1 goes a step further to ensure compatibility with the latest iOS and Android versions, keeping your applications up to date with the latest operating systems available. For iOS developers, the introduction of Swift Package Manager (SPM) support makes it easier to add Mobile SDK into your projects.

To take advantage of these improvements, and to continue delivering secure, modern, and user-friendly mobile apps, consider upgrading to our latest version, Mobile SDK 11.1 for iOS and Android!

Further resources

About the author

 Galen Lewis is an Associate Product Manager on the Mobile SDK team at Salesforce. Follow him on LinkedIn

Get the latest Salesforce Developer blog posts and podcast episodes via Slack or RSS.

Add to Slack Subscribe to RSS