1李命、安裝fastlane
1、確保安裝Xcode Command Line Tools 浪读,沒有安裝在終端輸入:
xcode-select --install
2、安裝Tools完成之后在終端輸入:
sudo gem install fastlane --verbose
假如報(bào)錯(cuò)用:sudo gem install -n /usr/local/bin fastlane
2辛藻、初始化
1碘橘、終端 cd到工程目錄下,初始化:
fastlane init ============= fastlane下載到工程目錄下
2吱肌、輸入AppID和密碼痘拆,確認(rèn)APP信息
3、配置Fastfile文件,在Fastfile文件中添加
desc “development"
lane :development do
# match(type: "adhoc")
# snapshot
gym(
scheme: "項(xiàng)目名稱",
export_method: "development",
configuration: “Debug”,
output_directory: "~/Desktop/"
)
# Build your app - more options available
notification(
title: "打包成功"
)
deliver(force: true)
# frameit
end
desc “adHoc"
lane :adHoc do
# match(type: "adhoc")
# snapshot
gym(
scheme: "項(xiàng)目名稱",
export_method: "ad-hoc",
configuration: "Debug",
output_directory: "~/Desktop/"
)
# Build your app - more options available
notification(
title: "打包成功"
)
deliver(force: true)
# frameit
end
desc "release"
lane :release do
# match(type: "appstore")
# snapshot
gym(
scheme: "項(xiàng)目名稱",
export_method: "app-store",
configuration: "Release",
output_directory: "~/Desktop/"
) # Build your app - more options available
notification(
title: "打包成功"
)
# deliver(force: true)
# frameit
end