Add the scheme configuration option to the run-ios command

Summary:
With the current `run-ios` script it is not possible to create/run iOS release builds or any other kind of scheme configuration from the terminal (we need to use `Xcode`). The reason for this is that the `run-ios` script does not expose the scheme configuration option for the `xcodebuild` command. This PR exposes that property and allows the developers to directly create/run release builds from the terminal.

This PR also closes [this](https://productpains.com/post/react-native/create-ios-release-builds-from-terminal) request at `productpains`.

And answers to [this](http://stackoverflow.com/questions/40303229/run-a-react-native-ios-release-build-from-terminal) question at the `stackoverflow`.

**Test plan (required)**

To generate a release build just run:

``` sh
react-native run-ios --configuration Release
```

The output

``` sh
Found Xcode project App.xcodeproj
Launching iPhone 6 (iOS 9.3)...
Building using "xcodebuild -project App.xcodeproj -scheme App -destination id=B0738993-CE4A-4D
Closes https://github.com/facebook/react-native/pull/10637

Differential Revision: D4151793

Pulled By: cpojer

fbshipit-source-id: 5a0fcdd59589977f3e251ec9bb3ba85e8919cffc
This commit is contained in:
Sandro Machado
2016-11-10 09:54:25 -08:00
committed by Facebook Github Bot
parent 4785a60115
commit ca7cbdee85
2 changed files with 26 additions and 17 deletions

View File

@@ -206,6 +206,10 @@ Building an app for distribution in the App Store requires using the `Release` s
Apps built for `Release` will automatically disable the in-app Developer menu, which will prevent your users from inadvertently accessing the menu in production. It will also load the JavaScript locally, so you can put the app on a device and test whilst not connected to the computer.
> Hint
>
> You can also use the `React Native CLI` to perform this operation using the option `--configuration` with the value `Release` (e.g. `react-native run-ios --configuration Release`).
Once built for release, you'll be able to distribute the app to beta testers and submit the app to the App Store.
### App Transport Security