Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docs to show how to select specific simulator. #8078

Closed
wants to merge 9 commits into from
2 changes: 1 addition & 1 deletion docs/RunningOnDeviceIOS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: Running On Device
layout: docs
category: Guides (iOS)
permalink: docs/running-on-device-ios.html
next: communication-ios
next: running-on-simulator-ios
---

Note that running on device requires [Apple Developer account](https://developer.apple.com/register) and provisioning your iPhone. This guide covers only React Native specific topic.
Expand Down
18 changes: 18 additions & 0 deletions docs/RunningOnSimulatorIOS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
id: running-on-simulator-ios
title: Running On Simulator
layout: docs
category: Guides (iOS)
permalink: docs/running-on-simulator-ios.html
next: communication-ios
---

## Starting the simulator

Once you have your React Native project initialized, you can run `react-native run-ios` inside the newly created project directory. If everything is set up correctly, you should see your new app running in the iOS Simulator shortly.

## Specifying a device

You can specify the device the simulator should run with the `--simulator` flag, followed by the device name as a string. The default is `"iPhone 6"`. If you wish to run your app on an iPhone 4s, just run `react-native run-ios --simulator "iPhone 4s"`.

The device names correspond to the list of devices available in Xcode. You can check your available devices by running `xcrun simctl list devices` from the console.