mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-23 03:50:11 +08:00
Added react-native run-ios
Summary: Works the same way as `react-native run-android`, but targets iOS simulator instead. Under the hood, it uses `xcodebuild` to compile the app and store it in `ios/build` folder, then triggers `instruments` and `simctl` to install and launch the app on simulator. Since Facebook relies on BUCK to build and run iOS app, we probably won't use `run-ios` internally. That's why I'm putting this as public PR instead of internal diff. To test this, I hacked global `react-native` script to install react native from my local checkout instead of from npm, cd into the folder and ran `react-native run-ios`. Closes https://github.com/facebook/react-native/pull/5119 Reviewed By: svcscm Differential Revision: D2805199 Pulled By: frantic fb-gh-sync-id: 423a45ba885cb5e48a16ac22095d757d8cca7e37
This commit is contained in:
committed by
facebook-github-bot-6
parent
8772a6a542
commit
9490c2c759
@@ -25,6 +25,7 @@ var link = require('./library/link');
|
||||
var path = require('path');
|
||||
var Promise = require('promise');
|
||||
var runAndroid = require('./runAndroid/runAndroid');
|
||||
var runIOS = require('./runIOS/runIOS');
|
||||
var server = require('./server/server');
|
||||
var TerminalAdapter = require('yeoman-environment/lib/adapter.js');
|
||||
var yeoman = require('yeoman-environment');
|
||||
@@ -46,6 +47,7 @@ var documentedCommands = {
|
||||
'link': [link, 'Adds a third-party library to your project. Example: react-native link awesome-camera'],
|
||||
'android': [generateWrapper, 'generates an Android project for your app'],
|
||||
'run-android': [runAndroid, 'builds your app and starts it on a connected Android emulator or device'],
|
||||
'run-ios': [runIOS, 'builds your app and starts it on iOS simulator'],
|
||||
'upgrade': [upgrade, 'upgrade your app\'s template files to the latest version; run this after ' +
|
||||
'updating the react-native version in your package.json and running npm install']
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user