Understand the Mobile Development Cycle
Mobile Development Preview Environments
Preview in the Salesforce Mobile App
Debug Mobile Components
Previous Versions
To verify your Lightning web components in Salesforce on many devices, use virtual device builds of the Salesforce mobile app. These builds make it possible to run Salesforce on iOS simulators and Android emulators.
You can always inspect your components in Salesforce on physical mobile devices. However, if you’re testing a great variety of models, you could quickly deplete your hardware budget. To test more efficiently, run Salesforce virtual device builds on virtual representations of iOS and Android devices.
Virtual device builds come in packages that you can drop onto a running instance of an iOS simulator or an Android emulator. To obtain simulators and emulators, install each platform’s development environment: Xcode for iOS, and Android Studio for Android. You can run Salesforce on any supported simulator or emulator provided with these environments. We recommend running the latest version of iOS or Android on your virtual device builds.
Salesforce has tested the Salesforce Android version on Google and Samsung devices, and the iOS version on iPhones and iPads. For a list of tested devices, see “Requirements for the Salesforce App” in Salesforce Help.
Salesforce mobile app isn’t the only Salesforce app that supports virtual device builds. For example, you can also use the following instructions with Salesforce Field Service.
Tip
If you haven’t installed Xcode, see Install Xcode. We recommend installing the latest version of Xcode.
After you’ve installed Xcode, verify your system environment. See Verify Your iOS Setup.
If you haven’t installed Android Studio and Android emulators, see Install Android Studio.
After you’ve installed Android Studio, verify your system environment. See Verify Your Android Studio Setup.
To obtain virtual device builds, you download the mobile app package files that contain them. For iOS, the package is a ZIP file. For Android, it’s an APK file. The packages are publicly available, don’t require you to log in, and don’t automatically expire. To download packages for other apps (like Salesforce Field Service), substitute the package download URL and the iOS app file name as specified in the other app’s documentation.
iOS: Package (ZIP) file download: sfdc.co/salesforce-mobile-app-ios-simulator. Extracted file name: Chatter.app
Android: Package (APK) file download: sfdc.co/salesforce-mobile-app-android-emulator
You can use Android builds on Mac and Windows operating systems. You can use iOS builds on Mac. Install the virtual device build on each simulator or emulator you intend to use.
iOS
Android
You can develop Lightning web components in a Salesforce CLI (SFDX) project. If you’re new to SFDX projects for Lightning Web Components, get started quickly with this Trailhead project.
From VS Code, it’s easy to install your component in a scratch org.
In VS Code, enter Command-Shift-P or Ctrl-Shift-P to launch the Command Palette.
If you don’t have a scratch org:
SFDX: Create a Default Scratch Org, then click the matching VS Code listing.SFDX: Push Source to Default Scratch Org, then click the matching VS Code listing.See Debug Your Components with Virtual Device Builds for detailed instructions.
See Also