在IOS和Android平台上构建并运行React-Native Codebase 在IOS和Android平台上运行反应本机代码所需的基本命令是什么
在Android和IOS平台上运行App的步骤
1)从存储库签出
2)转到项目目录
3)跑
npm install
4)运行react-native run-android
在Android设备react-native run-ios
上运行应用程序以在IOS模拟器上运行应用程序
Android特定:
React-Native准备未签名的APK:
您需要手动为调试版本创建捆绑包。
捆绑调试版本:
跑 :
react-native bundle --dev false --platform android --entry-file index.android.js --bundle-output ./android/app/build/intermediates/assets/debug/index.android.bundle --assets-dest ./android/app/build/intermediates/res/merged/debug
创建调试版本:
cd android
然后
./gradlew assembleDebug
Generated apk将位于android/app/build/outputs/apk
IOS具体
您需要手动为调试版本创建捆绑包。
运行:react-native bundle --dev false --entry-file index.ios.js --bundle-output ios/main.jsbundle --platform ios
转到qazxsw poi打开Xcode项目文件
转到Xcode中的XCode
- > Product
,然后根据您想要的版本执行相应步骤
是
完成!!!