ios自动打包使用fastlane
1、首先安装xcode
首先检查是否已经安装 Xcode 命令行工具,fastlane 使用 xcodebuild
命令进行打包,运行 xcode-select --install
命令,根据你的情况进行不同处理。
2、没有弹出提示,命令行提示 xcode-select: note: install requested for command line developer tools
, 则需要运行下面命令,指定 Xcode 命令行工具所在的路径。
$ xcode-select -p // 打印 Xcode 开发目录
/Applications/Xcode.app/Contents/Developer
$ xcode-select --switch /Applications/Xcode.app/Contents/Developer //进行选择
安装 fastlane:
sudo gem install fastlane --verbose
安装成功后查看版本:fastlane --version
初始化:fastlane
进入项目目录,进行初始化操作
fastlane init
选择4、进行自定义操作
补充:
1.fastlane 初始化默认会创建三个文件:Fastfile、Appfile、Deliverfile;两个文件夹:metadata、screenshots
2.Fastfile : 核心文件,主要用于 命令行调用和处理具体的流程,lane相对于一个方法或者函数
3.Appfile : 存储有关开发者账号相关信息
4.Deliverfile: deliver工具的配置文件
安装蒲公英的 fastlane 插件
$ fastlane add_plugin pgyer
安装g工具