Newer Version Available
Set Up Xcode
Before you run previews in iOS simulators, make sure that the latest version of Xcode
is properly installed and configured. After you install Xcode, test your environment with the
Mobile Preview setup command. If you’re using an existing
Xcode installation, run the setup command to verify that your
installed environment meets Mobile Extensions requirements.
Install Xcode
How you install Xcode depends on your version of macOS. We recommend using the latest version of macOS and Xcode. You can download and install Xcode from developer.apple.com/downloads/more. This site requires you to log in with your Apple ID.
If you’ve already installed Xcode, skip to “Verify Your iOS Setup.”
Verify Your iOS Setup
To verify that your new or existing Xcode environment is ready for iOS previews, run the
Mobile Extensions setup
command:
If
setup reports any issues, follow these steps to correct
them.
1sf force:lightning:local:setup -p ios-
Use the latest macOS: To run Mobile Extensions for iOS, you have to use a Mac.
Make sure it's using the latest version of macOS.
- On your Mac, click About This Mac in the System menu.
- Under Overview, look for the operating system name and version. Examples: “macOS Sonoma Version 14.5”.
-
Verify that you’re running the latest version of Xcode.
- In Xcode, select and check the version number.
-
Add an iOS simulator that runs the latest version of iOS.
- In , select Components.
In the Simulator list, installed simulators are marked with a blue check. The default simulator for your version of Xcode doesn’t appear in this list.
- If none of your installed simulators use the latest version of iOS, check and install at least one updated iOS simulator.
- In , select Components.
-
Final check: Rerun the setup
command:
1sf force:lightning:local:setup -p ios - To see the list of installed virtual devices that Mobile Extensions recognizes on your
machine, use the device:list
command:
1sf force:lightning:local:device:list -p ios