1--- 2title: iOS Simulator 3description: Learn how you can install the iOS simulator on your Mac and use it to develop your app. 4--- 5 6import ImageSpotlight from '~/components/plugins/ImageSpotlight'; 7import Video from '~/components/plugins/Video'; 8import { Terminal } from '~/ui/components/Snippet'; 9import { Step } from '~/ui/components/Step'; 10 11It's often convenient to develop your app directly on your computer rather than having to physically interact with an iPhone and iPad and load your app over the network, which may be slow under some conditions such as if you need to use a tunnel connection because LAN isn't possible on your network. 12 13This guide explains how you can install the iOS Simulator on your Mac and use it for developing your app. It is impossible to install the iOS Simulator on any operating system except macOS. If you want to develop an app for iOS from a Windows machine then you will need a physical iOS device. 14 15<Step label="1"> 16 17## Install Xcode 18 19Open up the Mac App Store, search for [Xcode](https://apps.apple.com/us/app/xcode/id497799835), and click install (or update if you have it already). If you're unable to update, it is because your operating system might be out of date. We recommend updating your operating system to the latest version and then updating Xcode. You may run into issues further down the line if your Xcode version is out of date. For example, you may not be able to submit your app to the App Store. 20 21</Step> 22 23<Step label="2"> 24 25## Install Xcode Command Line Tools 26 27Open Xcode, then choose **Settings...** from the Xcode menu (or press <kbd>Cmd ⌘</kbd> + <kbd>,</kbd>). Go to the **Locations** and install the tools by selecting the most recent version in the **Command Line Tools** dropdown. 28 29<ImageSpotlight alt="Xcode preferences" src="/static/images/ios-simulator/xcode-command-line.png" /> 30 31</Step> 32 33<Step label="3"> 34 35## Try it out 36 37Run your app with `npx expo start` and press <kbd>i</kbd> from the command line. 38 39You may get a warning about needing to accept the Xcode license. Run the command that it suggests. Open your app again to see if it was successful. If not, check the [troubleshooting](#troubleshooting) tips below. 40 41If the troubleshooting tips are not helpful, seek help on [Expo Development Tools section of the forums](https://forums.expo.dev/c/expo-dev-tools), Stack Overflow, or Google. 42 43<Video file="open-in-ios-simulator.mp4" /> 44 45You can also press <kbd>Shift</kbd> + <kbd>i</kbd> in the Expo CLI to interactively select a simulator to open. 46 47<ImageSpotlight 48 alt="List of iOS Simulators in the Expo CLI UI." 49 src="/static/images/ios-simulator/simulators-list.png" 50/> 51 52</Step> 53 54## Limitations 55 56Although the iOS Simulator is great for rapid development, it does come with a few limitations. We'll list out a few of the main differences that affect Expo APIs here, however, [Apple's documentation](https://help.apple.com/simulator/mac/current/#/devb0244142d) goes into more detail. 57 58The following hardware is unavailable in the Simulator: 59 60- Audio Input 61- Barometer 62- Camera 63- Motion Support (accelerometer and gyroscope) 64 65The Simulator also suspends background apps and processes on iOS 11 and later. 66 67## Troubleshooting 68 69### The CLI seems to be stuck when opening a Simulator 70 71Sometimes the iOS Simulator doesn't respond to the open command. If it seems stuck on this prompt, you can open the iOS Simulator manually (`open -a Simulator`) and then in the macOS toolbar, choose **File** > **Open Simulator**, and select an iOS version and device that you'd like to open. 72 73<ImageSpotlight 74 alt="Opening a simulator manually from the macOS toolbar." 75 src="/static/images/ios-simulator/open-simulator-manually.png" 76/> 77 78You can use this menu to open any version of the simulator. You can also open multiple simulators at the same time, however, Expo CLI will always target the most recently opened simulator. 79 80### Simulator opened but the Expo Go app isn't opening inside of it 81 82The first time you install the app in the simulator, iOS will ask if you'd like to open the Expo Go app. You may need to interact with the simulator (click around, drag something) for this prompt to show up, then press **OK**. 83 84### How do I force an update to the latest version? 85 86Create a project with the desired SDK version and open it in a simulator to install a particular version of Expo Go. 87 88<Terminal 89 cmd={[ 90 '# Bootstrap an SDK 48 project', 91 '$ npx create-expo-app --template blank@48', 92 '', 93 '# Open the app on a simulator to install the required Expo Go app', 94 '$ npx expo start --ios', 95 ]} 96/> 97 98### Expo CLI is printing an error message about `xcrun`, what do I do? 99 100For miscellaneous errors, try the following: 101 102- Manually uninstall Expo Go on your simulator and reinstall by pressing <kbd>Shift</kbd> + <kbd>i</kbd> in the Expo CLI Terminal UI and selecting the desired simulator. 103- If that doesn't help, focus the simulator window and in the Mac toolbar choose **Device** > **Erase All Content and Settings...**<br/> 104 This will reinitialize your simulator from a blank image. This is sometimes useful for cases where your computer is low on memory and the simulator fails to store some internal files, leaving the device in a corrupt state. 105