version_number = get_version_number(xcodeproj: project+".xcodeproj")
build_number = get_build_number(xcodeproj: project+".xcodeproj")
# 將 version number 和 build number 回寫 info.plist
lane :sync_version_and_build_number_to_info_plist do
update_plist(
plist_path: "path/to/Info.plist",
block: proc do |plist|
plist["CFBundleShortVersionString"] = version_number
plist["CFBundleVersion"] = build_number
end
)
end
desc "Firebase App_distribution"
lane :distribute do |values|
sync_version_and_build_number_to_info_plist # 加入此行
build_ios_app(
....do your project configure
)
end
desc "export archive and ipa"
lane :export do
path = "Export/" + version_number + "/" + build_number
sync_version_and_build_number_to_info_plist # 加入此行
gym(
....do your project configure
)
end