gpb*_*pbl 9 xcode ios react-native fastlane
我想自动化我的React-Native应用程序的构建+部署,例如提交TestFlight构建.
在提交应用程序之前,我通常会执行以下操作:
react-native bundleRelease架构中jsCodeLocation在AppDelegate.m中注释掉了相对于代码的代码是否可以从终端编写单个命令来执行这些步骤,以便我可以使用自动化工具部署它,例如fastlane?
到目前为止,我只需要自动完成第二步和第三步.
要改变jsCodeLocation我可以添加条件,例如
#if "<build configuration is release>"
jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle"];
#else
jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
#end
Run Code Online (Sandbox Code Playgroud)
但我不知道如何达到构建配置设置.
gpb*_*pbl 16
我解决了重写AppDelegate.m为
#ifdef DEBUG
jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle"];
#else
jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
#endif
Run Code Online (Sandbox Code Playgroud)
现在我可以使用fastlane来部署而无需编辑文件.
| 归档时间: |
|
| 查看次数: |
5360 次 |
| 最近记录: |