公司项目迭代速度快,电脑又奇卡不比,项目打包都弄得怀疑人生了...
![](https://img.haomeiwen.com/i1840549/62e5f4bca1fb783c.jpg)
鬼知道我经历了什么
![](https://img.haomeiwen.com/i1840549/b2eac36c8e2c2555.png)
早有耳闻Fastlane打包神器,奈何项目面向客户编程, 功能需求变化多又快。无奈没能实践。💔
本着要进步、爱动手实践的学习精神,有一丢丢闲暇我就折腾起来了。~\(≧▽≦)/~
环境配置
1. 安装Xcode命令行工具
xcode-select --install
![](https://img.haomeiwen.com/i1840549/6165c395e9136106.png)
2. 安装Fastlane , 推荐使用以下这条命令。
brew cask install fastlane
等待安装即可,若中途有报错,先认真看打印的提示信息,一般都能很好解决。再或者可以百度呀 。😎
![](https://img.haomeiwen.com/i1840549/655db681e3b7d3b8.png)
设置Fastlane
1. cd到工程目录下。
fastlane init
在fastlane的文件夹下有这两个文件
![](https://img.haomeiwen.com/i1840549/fac0ee2456d585cb.png)
2. Appfile 是关于App配置的一些信息。默认中已有App bundle identifier、App email address。依次填入就可。
Fastfile 是fastlane的环境配置文件。这里有具体Guide
![](https://img.haomeiwen.com/i1840549/0f79a4f8a86ee793.png)
3. 在命令行中执行以下命令
fastlane archive
4. 骚等一会,当你看到这个时,说明你又Get到一项技能了,👍。
![](https://img.haomeiwen.com/i1840549/be626f0f08ce6c74.png)
这是我其中遇到的错误提示。
1.Apple generic Versioning is not enabled in this project
解决方法:在 target -> building setting 中, 搜索 current project version, 出现 versioning system 选择 Apple Generic
2. [!] xcodebuild -showBuildSettings timed out after4retrieswitha base timeoutof3.You can override the base timeout valuewiththe environment variable FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT, and the numberofretrieswiththe environment variable FASTLANE_XCODEBUILD_SETTINGS_RETRIES
解决方法:在命令行中 export FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT=120
网友评论