
Security News
Software Engineering Daily Podcast: Feross on AI, Open Source, and Supply Chain Risk
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.
@salesforce/lwc-dev-mobile
Advanced tools
The Salesforce CLI Mobile Extensions allow you to extend the local preview capabilities of the Local Development Server plug-in. You can see live previews of your Lightning Web Components on virtual mobile devices for iOS and Android.
Note: This feature is in beta, and may contain significant problems, undergo major changes, or be discontinued. If you encounter any problems, or want to request an enhancement, please open a GitHub Issue.
To develop Lightning web components, use your favorite code editor. We recommend using Visual Studio Code because its Salesforce Extensions for VS Code provide powerful features for development on Lightning Platform.
Open a new terminal window and run the following command to install the Mobile Extensions:
sfdx plugins:install @salesforce/lwc-dev-mobile
Check for updates to the plug-in:
sfdx plugins:update
The Mobile Extensions plug-in can run only in the context of an SFDX project. See the installation instructions of the Local Development plug-in for all SFDX project setup requirements.
The Mobile Extensions plug-in supports two commands.
Setup helps you set up virtual mobile devices—iOS simulators and Android emulators—in your local environment.
sfdx force:lightning:local:setup -p <mobile platform>
-p, --platform=platform Specify platform ('iOS' or 'Android')For example:
$ sfdx force:lightning:local:setup -p iOS
Preview extends the local preview capabilities of the Local Development Server plug-in. With Mobile Extensions, you can use this plug-in to preview your Lightning Web Components on virtual mobile devices.
sfdx force:lightning:lwc:preview -n <component name> -p <mobile platform>] [-t <target>]
-n, --componentname=componentname The LWC component name-p, --platform=platform Specify platform ('iOS' or 'Android')-t, --target=target Specify name of target simulator or emulatorFor example:
$ sfdx force:lightning:lwc:preview -p Android -t LWCEmulator -n HelloWorldLwcComponent
We also provide a Visual Studio Code extension that exposes the Preview functionality through the IDE. That functionality is currently developed as part of the Salesforce Extensions for VS Code.
If you intend to develop or test drive the plug-in locally, this section will help you set up your development environment.
After you clone or fork this repo, run the following commands in the root folder of your local repo:
$ yarn install && yarn build
$ yarn test
From the top-level folder of the plug-in:
$ sfdx plugins:link .
From the top-level folder of the plug-in:
$ sfdx plugins:uninstall .
FAQs
Salesforce CLI plugin for mobile extensions to Local Development
The npm package @salesforce/lwc-dev-mobile receives a total of 53 weekly downloads. As such, @salesforce/lwc-dev-mobile popularity was classified as not popular.
We found that @salesforce/lwc-dev-mobile demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 47 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.

Security News
GitHub has revoked npm classic tokens for publishing; maintainers must migrate, but OpenJS warns OIDC trusted publishing still has risky gaps for critical projects.

Security News
Rust’s crates.io team is advancing an RFC to add a Security tab that surfaces RustSec vulnerability and unsoundness advisories directly on crate pages.