【发布时间】:2021-05-25 14:29:57
【问题描述】:
我希望能够为 Firebase Distribution 构建 adhoc 和为 TestFlight/AppStore 构建 appstore。我也在使用 CI/CD 系统 (CircleCI)。我使用Fastlane match 进行构建签名。我的问题是在不同类型的构建时如何在不同类型的证书之间切换?
我的想法是在 Xcode 中设置调试配置临时签名证书和发布配置应用商店证书。但是,当我测试这种方法时,发现临时构建会在应用启动后立即崩溃,因此这种方法看起来不正确。
这是我的快速文件:
platform :ios do
before_all do
setup_circle_ci
end
desc "Runs tests and build the app "
lane :testandbuild do |options|
commit = last_git_commit
# Uncomment the line if you want to increment build number
# increment_build_number(xcodeproj: "MyApp.xcodeproj")
scan(
scheme: "MyApp"
)
if(options[:branch] == "main")
increment_build_number
keyFilePath = File.join(Dir.pwd, "appStoreKey.p8")
app_store_connect_api_key(
key_id: options[:key_id],
issuer_id: options[:issuer_id],
key_filepath: keyFilePath,
# duration: 1200,
in_house: false,
)
match(type: "appstore", readonly: "false")
build_app(
scheme: "MyApp",
configuration: "Release"
)
upload_to_testflight(
skip_waiting_for_build_processing: true
)
else
match(type: "adhoc")
gym(export_method: "ad-hoc", scheme: "MyApp", configuration: "Debug" , output_directory: "../output")
firebase_app_distribution(
groups: 'dev-team',
release_notes: "Branch: #{options[:branch]}. Message: #{commit[:message]}",
firebase_cli_token: options[:firebase_cli_token]
)
end
end
end
【问题讨论】:
标签: ios firebase circleci fastlane fastlane-match