Newer Version Available

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

Set Up Xcode

Before you run previews in iOS simulators, make sure that Xcode 11 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. Mobile Extensions supports macOS version 10.14.4 (Mojave) and higher.

If you’ve already installed Xcode, skip to “Verify Your iOS Setup.”

macOS Catalina, version 10.15.x
  • If you’re new to Xcode or are running Xcode 10 or earlier, install the latest version of Xcode from the Mac App Store Mac App Store icon. The latest version of Xcode meets the requirements of Mobile Extensions.
macOS Mojave, version 10.14.4 minimum

Verify Your iOS Setup

To verify that your new or existing Xcode environment is ready for iOS previews, run the Mobile Extensions setup command:
1sf force:lightning:local:setup -p ios
If setup reports any issues, use the following steps to correct them.
  1. Use a Mac: Mobile Extensions for iOS requires a Mac running macOS Mojave version 10.14.4 and higher.
    1. On your Mac, click About This Mac in the System menu.
    2. Under Overview, look for the operating system name and version. Examples: “macOS Catalina Version 10.15.5”, “macOS Mojave Version 10.14.4”.
  2. Verify that you’re running Xcode 11 or later.
    1. In Xcode, select Xcode | About Xcode.
    2. Look for “Version 11.x.y” where x and y can be any integer values.
  3. Add an iOS simulator that runs iOS 13.
    1. In Xcode | Preferences, 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.

    2. If none of your installed simulators use iOS 13, check and install at least one iOS 13 simulator.
  4. Final check: Rerun the setup command:
    1sf force:lightning:local:setup -p ios
  5. 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