Starting with Salesforce Mobile SDK 12.2, developers can now run Salesforce-powered apps on Apple Vision Pro, with fully native visionOS and iPhone and iPad compatibility. This opens up new possibilities for spatial computing user experiences.

Apple Vision Pro is a revolutionary spatial computer that blends digital content with the physical world, enabling users to interact with business-critical content while staying present and connected to others. Discover more about Vision Pro’s capabilities on the Apple Vision Pro page and learn how to design spatial computing apps with visionOS developer resources.

In this blog post, we’ll show you how to use the latest updates in the Salesforce Mobile SDK 12.2 to build ready-to-use, customizable business apps for Apple Vision Pro. For a deeper dive into additional enhancements, check out our developer documentation.

What’s new in Salesforce Mobile SDK 12.2 for visionOS?

Mobile SDK 12.2 introduces new features to boost user experience and broaden device compatibility. 

As part of these enhancements, we’ve made it easy for developers to make their existing iPadOS or iOS apps available on visionOS, and also create new visionOS apps with minimal effort. To enable compatibility with Apple Vision Pro, we’ve updated our internal APIs across our SDK frameworks and iOS sample apps, which were previously limited to iPad, iPhone, and Mac.

The following frameworks are now supported on visionOS:

  • SalesforceSDKCommon: Utilities shared throughout the SDK
  • SalesforceAnalytics: A reporting mechanism that sends Salesforce anonymous statistics on Mobile SDK feature usage and popularity
  • SalesforceSDKCore: Implements OAuth, passcodes, networking, and REST APIs
  • SmartStore: A secure, offline storage that allows users to work with data even when their device is offline
  • MobileSync: An offline synchronization library that works with SmartStore to allow offline functionality

Mobile SDK samples & templates

If you’re familiar with Mobile SDK, you may know about our templates — ready-to-use sample apps that help you get started quickly, and that you can customize to fit your unique use case.

We’ve added visionOS support to the MobileSyncExplorerSwift template, which includes core Mobile SDK features, such as Salesforce REST API integration, SmartStore, and MobileSync, in a contacts app with full offline functionality and CRUD capabilities. This allows users to create, edit, fetch, and update contact data within a Salesforce org, even without connectivity.

MobileSyncExplorerSwift on Vision Pro

Get started now

To get started, the first thing you want to do is upgrade to the latest version of Salesforce Mobile SDK for iOS. The minimum version that supports Vision Pro is Mobile SDK 12.2.

To modify your existing Mobile SDK apps to run on Apple Vision Pro, you will need to first configure your Xcode project to add visionOS as a supported destination. 

Go to your project’s settings, select the app target, and under the General tab, click the Add (+) button in Supported Destinations. Choose the Apple Vision destination to build your app with the visionOS SDK. For more details, see Add visionOS as a supported destination for your app.

Adding visionOS as a supported destination in Xcode

If you’re building an app from scratch, start with the pre-configured MobileSyncExplorerSwift template that’s optimized for Apple Vision Pro. 

MobileSyncExplorerSwift Template in GitHub repo

Use our forceios tool with the command forceios createwithtemplate --templaterepouri=MobileSyncExplorerSwift and follow the setup instructions to get a fully functional app in minutes. See Creating an iOS Project with Forceios for more details.

An Example of using forceios createwithtemplate to get started

After completing the steps above, you’ll have a ready-to-use Vision Pro app built on the Salesforce Platform, customizable to your needs.

Now, you might be wondering: How can I extend my app to create engaging spatial computing experiences? 

Take it a step further 

Using the MobileSyncExplorerSwift template, a few SwiftUI enhancements like adding UI depth and ornaments can transform it into a captivating spatial computing experience on visionOS, unlocking new levels of engagement and interactivity. This is just one way to make these apps uniquely yours, with endless possibilities. We’re excited to see the innovative experiences you create!

Resources

About the author

Kevin Qi is an Associate Product Manager at Salesforce, where he focuses on driving innovation in Salesforce Mobile and generative AI. He leads the development of the Salesforce Mobile SDK, enhancing the mobile app ecosystem with next-gen user experiences and cutting-edge, on-device AI capabilities. With over a year at Salesforce, Kevin is passionate about leveraging technology to transform the mobile experience and empower users with smarter, trusted, and more efficient tools to get their job done.

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

Add to Slack Subscribe to RSS