简体   繁体   English

运行React Native应用程序而不启动Xcode?

[英]Run a React Native app without launching Xcode?

Can an iOS app (built entirely with React Native ) be built/run from the command line? 可以从命令行构建/运行iOS应用程序(完全由React Native构建)吗? PhoneGap has a nice ios-sim utility for doing just that, but I haven't had any luck with it. PhoneGap有一个很好的ios-sim实用程序,可以做到这一点,但是我没有运气。

If you build the project once using Xcode, then you can close it, run npm start in your project root (to start the packager), fire up the Simulator (maybe using ios-sim). 如果使用Xcode一次构建项目,则可以将其关闭,在项目根目录中运行npm start (以启动打包程序),启动Simulator(也许使用ios-sim)。 Since you built it once in Xcode, the app will be installed in the simulator so you can just run it and the whole CMD+R refresh process will work. 由于您是用Xcode一次构建的,因此该应用程序将安装在模拟器中,因此您可以运行它,整个CMD + R刷新过程将起作用。

Fire up the server with: 使用以下命令启动服务器:

$ npm start

Build/run the app in the ios simulator: 在ios模拟器中构建/运行应用程序:

$ react-native run-ios

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用模拟器启动本机应用程序时出错 - Error when launching react native app with emulator Apache Cordova:运行cordova无需启动浏览器应用程序即可运行浏览器 - Apache Cordova: running cordova run browser without launching browser app 我的React Native应用无法运行 - My React Native app doesn't run Redux 调度从未在 React Native 应用程序中运行 - Redux dispatch never run in React Native app 从Xcode运行时,React Native项目无法加载 - React Native project fails to load when I run from Xcode 不使用xcode react-native更换设备 - Change device without using xcode react-native 当我在我的设备中运行我的React Native应用程序而未通过电缆在PC上连接时,它显示了2个月前的应用程序状态 - When I run my React Native app in my device without connecting on the pc via cable, it show the app state 2 month ago 无法使用 Xcode 7.3 将 React Native 应用程序上传到 iTunes Connect - Can't upload React Native app to iTunes Connect with Xcode 7.3 Simple React Native iOS应用未在xcode和命令行中运行 - Simple React Native iOS App is not running in xcode and command line React Native:你能强制 react-native run-ios 使用不同的 XCode 安装吗? - React Native: Can you force react-native run-ios to use a different installation of XCode?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM