自动化打包之fastlane–(1) 研究之必须提前了解的几点
自动化打包之fastlane–(2) fastlane init图文教程
自动化打包之fastlane–(3) 安装fir插件图文教程
1. Building 编译
1.1. gym
- 官方链接
gym
是build_ios_app
的别名build_app
是build_ios_app
的别名gym
是fastlane
的一部分: 可以更快速地编译和打包- 主要作用是用来编译和打包iOSAPP的,简化了
xcodebuild
的命令行操作 - 是
shenzhen(另一款开源库)
的替代者 - 自动生成
ips
包和dSYM
文件 - 可以动态滴配置相关参数和环境变量
gym使用示例和Parameters参数
gym(
key1:value1,
key2:value2,
key3:value3
)
//gym和build_app都是build_ios_app的别名
build_ios_app(
workspace: "MyApp.xcworkspace",
configuration: "Debug",
scheme: "MyApp",
silent: true,
clean: true,
output_directory: "path/to/dir", # Destination directory. Defaults to current directory.
output_name: "my-app.ipa", # specify the name of the .ipa file to generate (including file extension)
sdk: "iOS 11.1" # use SDK as the name or path of the base SDK when building the project.
)
Parameters
workspace
: 使用cocoapods后的工程文件路径project
: 项目文件路径scheme
: 项目的白名单,在Manage schemes
中将其设置为shared
状态output_directory
: 打包出来的ipa包存储的位置 .output_name
: 打包出的ipa包名称configuration
: 编译APP是的配置,默认是release
silent
: 编译时隐藏不必要的信息,默认是falseexport_method
: 打包的类型:app-store
,ad-hoc
,package
,enterprise
,development
,developer-id
export_options
: 导出的选项设置,新Xcode允许导出时修改plist文件build_path
: 打archive包的存储路径buildlog_path
: 存储bulid的logsdk
: 打包时使用的sdk
1.2. cocoapods
cocoapods
项目中使用pod intall
,和cocoapods相关的项目,使用pod相关的命令即可,不用在使用fastlane命令- 如果项目中使用cocoapods,在Gemfile中添加gem