您可以在 fastlane 中使用以下内容导出MyArchiveName.xcarchive
:
build_app(
configuration: "Release",
project: "Path/To/My.xcodeproj",
export_method: "app-store",
export_options: {iCloudContainerEnvironment: "Production"},
skip_codesigning: true,
skip_package_ipa: true,
archive_path: "MyArchiveName.xcarchive"
)
然后你可以把MyArchiveName.xcarchive
它交给你的客户,然后他们可以在 fastlane 中运行以下构建:
lane :sign_xcarchive_and_publish do
default_platform(:ios)
sync_code_signing(
type: "appstore"
)
# You must create a fake xcodeproj to pass in.
# This is needed to work around this issue in fastlane: https://github.com/fastlane/fastlane/issues/13528
# See also: https://github.com/fastlane/fastlane/issues/11402 and https://github.com/fastlane/fastlane/issues/15876
xcodeproj_path = File.expand_path("../fake.xcodeproj")
Xcodeproj::Project.new(xcodeproj_path).save
build_app(
configuration: "Release",
project: xcodeproj_path,
output_name: "MyOutput.ipa",
export_method: "app-store",
export_options: { iCloudContainerEnvironment: "Production" },
export_team_id: CredentialsManager::AppfileConfig.try_fetch_value(:team_id), # This requires the team_id to be set in the fastlane `Appfile`
skip_build_archive: true,
skip_package_dependencies_resolution: true,
archive_path: "MyArchiveName.xcarchive"
)
upload_to_testflight(
skip_submission: true,
skip_waiting_for_build_processing: true
)
end
请注意,您需要验证插件是否已正确构建和签名。我还没有遇到问题,但更复杂的构建可能会。另请注意,这仅适用于客户端直接上传到应用商店,我没有尝试任何其他类型的签名。