Newer Version Available

This content describes an older version of this product. View Latest

Mobile Development Preview Environments

While coding components, developers can launch mobile previews from VS Code or from the command line. Developers can also preview components in context in the Salesforce mobile app, or in a virtual device build of the Salesforce mobile app. Salesforce admins can preview Lightning Experience on mobile from Lightning App Builder.

Administrators

Salesforce Administrators work with stakeholders to define requirements and to customize their org, using the full variety of tools available in Salesforce. When customizing pages, administrators should validate their changes for both desktop and mobile.

App Builder Mobile Previews

Admins can use Lightning App Builder to build apps and pages to customize Lightning Experience on mobile. App Builder provides previews for both desktop and mobile. Admins can specify certain components as mobile- or desktop-only. See Visibility Rules on Lightning Pages for available filtering options.

For more information about building and previewing pages in App Builder, see Build a Mobile App Page and Get Ready for Lightning — 5 step-by-step videos.

Preview components in Lightning App Builder

If admins need more than a preview, they can run Lightning applications and components in the Salesforce mobile app on their devices. Testing in the mobile app helps validate that users have the best experience on mobile.

Developers

Salesforce developers building Lightning web components have many options available to validate their components for mobile.

Preview with Local Development

During development you can view mobile previews for Lightning web components locally with the Salesforce Extensions for Visual Studio Code. You can launch a mobile preview from the Command Palette while you’re editing a component. Mobile previews immediately reflect visual changes you make to your component as you edit, before publishing to Salesforce. Local previews can display your component in a web browser on your desktop and on a simulated mobile device.

Preview components using Local Development

Learn more about mobile previews using local development tools.

Preview in the Salesforce Mobile App

Previews using the local development server are great for immediately seeing the effects of changes. After your component is validated locally, publish it to a Salesforce development org and validate it on pages with other components in the Salesforce mobile app. You can run the Salesforce mobile app on physical devices and on virtual devices.

  • Physical Devices

    You can run your Lightning applications and components using the Salesforce mobile app on your device. Use the mobile app to review issues your applications and components encounter on mobile. The Salesforce mobile app is available for download from the App Store and Google Play.

    Preview components in the Salesforce mobile app
  • Virtual Device Builds

    You can run your Lightning applications and components using virtual device builds of the Salesforce mobile app. These builds make it possible to run Salesforce on iOS simulators and Android emulators so you can validate and debug your components on many devices. To learn how to download virtual device builds, see Preview Components in the Salesforce Mobile App.

    Preview components using virtual device builds