【发布时间】:2015-12-29 09:08:36
【问题描述】:
我想自动化我的 React-Native 应用的构建 + 部署,例如提交一个 TestFlight 构建。
在提交应用之前,我通常会做以下事情:
- 我跑
react-native bundle - 我将架构中的构建配置切换为
Release - 我注释掉AppDelegate.m中与
jsCodeLocation相关的代码
是否可以从终端编写单个命令来执行这些步骤,以便我可以使用自动化工具部署它,例如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
但我不知道如何访问构建配置设置。
【问题讨论】:
标签: ios xcode react-native fastlane