我希望能够为 TestFlight/AppStore 进行adhoc
构建Firebase Distribution
和构建。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