From b0dbb4210fa2201b6977599c8aab58157101a7e1 Mon Sep 17 00:00:00 2001 From: Joel Cloralt Date: Tue, 21 Jun 2016 12:53:07 -0700 Subject: [PATCH] Add docs to show how to select specific simulator. Summary: Add a message to let people know they can use the `--simulator` flag to run their apps on different simulators instead of the default "iPhone 6" Closes https://github.com/facebook/react-native/pull/8078 Differential Revision: D3464912 Pulled By: JoelMarcey fbshipit-source-id: b59d5061d2b3501618602932fcc285bac99b7573 --- docs/RunningOnDeviceIOS.md | 2 +- docs/RunningOnSimulatorIOS.md | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 docs/RunningOnSimulatorIOS.md diff --git a/docs/RunningOnDeviceIOS.md b/docs/RunningOnDeviceIOS.md index 40c0fc43461..947795d16dc 100644 --- a/docs/RunningOnDeviceIOS.md +++ b/docs/RunningOnDeviceIOS.md @@ -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. diff --git a/docs/RunningOnSimulatorIOS.md b/docs/RunningOnSimulatorIOS.md new file mode 100644 index 00000000000..3746ddb5cd1 --- /dev/null +++ b/docs/RunningOnSimulatorIOS.md @@ -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.