0
我很好奇爲什麼需要打開Xcode並單擊「構建並運行」(每https://facebook.github.io/react-native/docs/running-on-device-ios.html#content)以便能夠在我的iPhone上運行我的應用程序。在iOS設備上構建React Native應用程序
$ react-native help
Usage: react-native <command>
Commands:
- start: starts the webserver
- bundle: builds the javascript bundle for offline use
- unbundle: builds javascript as "unbundle" for offline use
- new-library: generates a native library bridge
- link: Adds a third-party library to your project. Example: react-native link awesome-camera
- android: generates an Android project for your app
- run-android: builds your app and starts it on a connected Android emulator or device
- run-ios: builds your app and starts it on iOS simulator
- 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
爲react-native
命令顯示run-ios
只是到iOS模擬器的幫助頁面,而run-android
可以建立到設備或仿真器。
有誰知道我可以如何使用react-native-cli
或其他命令行工具,以便能夠將我的應用程序直接構建到我的iPhone上的開發環境,就像我遵循上述文檔一樣?
這很有道理 – Jesse