Install Salesforce Mobile App Simulator for iOS
In this project, you’ll learn how to:
- Install and configure the Salesforce Mobile App Simulator for iOS (only for macOS).
- Install and configure the Salesforce Mobile App Emulator for Android.
- Customize and view a Lightning web component on mobile.
- Discover other mobile development tools.
Develop Mobile-Friendly Lightning Web Components
With more Salesforce users running their businesses from their phones, making your Lightning web components mobile-friendly can help you reach a wider audience. There’s a chance that a component you develop is already mobile-friendly. However, since it’s not hard, you should take the extra effort to verify. That way, you know with certainty that your users won’t encounter easily avoidable issues.
Fortunately, you can view, test, and even debug your Lightning web components against iOS devices or Android devices straight from your desktop using mobile simulators. Let’s go over how to add both of these tools to your development environment and how to use them while developing.
Get Your Trailhead Playground Username and Password
Let’s get started by opening your Trailhead Playground. Scroll to the bottom of this page and click Launch. If you see a tab in your org labeled Get Your Login Credentials, great! Follow the steps below.
If not, from the App Launcher, find and open Playground Starter and follow the steps. If you don’t see the Playground Starter app, check out Find the Username and Password for Your Trailhead Playground on Trailhead Help.
- Click the Get Your Login Credentials tab and take note of your username.
- Click Reset My Password. This sends an email to the address associated with your username.
- Click the link in the email.
- Enter a new password, confirm it, and click Change Password.
Configure Your iOS Mobile Simulator
Xcode is the integrated developer environment (IDE) for iOS mobile applications and contains an iOS simulator you can use to test your Lightning web components. After it’s configured, you can run the iOS simulator straight from your Visual Studio Code environment, which you learn about later.
- Download and install the latest version of Xcode. If you already have Xcode installed, there’s no need to reinstall it.
- Launch Xcode.
- In the menu bar, select Xcode | Open Developer Tool | Simulator. A new program called Simulator opens, displaying a mobile screen.
- Go to File | Open Simulator to choose your preferred device.
- You can close Xcode, but keep the Simulator window open to install the Salesforce app in the next section.
Install the Salesforce Mobile App Simulator for iOS
A newly configured iOS simulator includes only Apple’s default apps. So you need to install the Salesforce Mobile app to test your Lightning web components. And if you’re testing against multiple iOS devices, you must install the app for each device simulator.
- Download the iOS simulator build of the Salesforce Mobile app from Salesforce Mobile Tools.
- If you encounter a redirect page, click Continue.
- Double-click the downloaded zip file to extract the app file. The app is named Chatter.app. Long story, for another time.
- Drag the extracted app file into the Simulator window.
- In Simulator, click the newly installed Salesforce app to open it. If you don’t see the app on the first page, it probably installed on a different app page. You can swipe the page with your mouse to see additional pages to find the app.
- Click I Accept to agree to the end-user license agreement.
- Enter your Salesforce username and password for your development org, and click Log In.
- Enter the verification code that was sent to you and click Verify.
- Click Allow to allow the app to access your Salesforce information. After you’ve logged in, you’ll be greeted with a Welcome to the Mobile App popup.
- Click Get Started to start using the app.
That’s it! Now you can use the Salesforce mobile app for iOS on your computer. Later, you also learn how to open the Simulator directly from Visual Studio Code.
We won’t check any of your setup. Click Verify Step to go to the next step in the project.