React Native 日常使用

运行已有项目

先初始化
安装node_modules 非常简单, 进入项目目录执行命令
npm install
运行
cd /Users/mrs.liang/Workbench/GeQing/palmscore/client_rn/Score-master

react-native run-ios 
或者
react-native run-android
修改js代码后再次运行
ios模拟器,按快捷键:command+r

常用命令

adb devices  #查看连接设备

问题

无法安装app到ios模拟器的问题
执行react-native run-ios命令编译成功,安装报错:
Installing build/Build/Products/Debug-iphonesimulator/Score.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Failed to install the requested application
An application bundle was not found at the provided path.
Provide a valid path to the desired application bundle.
Print: Entry, ":CFBundleIdentifier", Does Not Exist

Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/Score.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist

解决方式:
执行如下命令:
react-native upgrade
react-native run-ios
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容