[英]Fastlane, how do I use match to indicate PROVISIONING_PROFILE_SPECIFIER for my host and share extension in ios app?
[英]How do I use fastlane to compile my iOS app into an .xcarchive, then separately sign and make an IPA?
我正在为客户制作 iOS 应用程序,但无权访问他们的配置文件或签名证书。
我想给我的客户一个已经编译的应用程序版本,这样他们需要做的就是签署它,然后将它上传到 TestFlight 和 App Store。
以前我给我的客户整个.xcodeproj
,在这种情况下是从 Unity 游戏中导出的,但是他们使用不同版本的 Xcode 和在不同机器上使用 CocoaPods 时出现问题。
看起来我可以通过将我的 iOS 应用程序导出到没有任何配置文件或签名证书的 .xcarchive 来做到这一点.xcarchive
然后给他们。 xcarchive
并让他们签名, .ipa
.ipa 并将其上传到 App Store。 我目前正在使用 fastlane 进行自动化构建,并希望继续使用这个新解决方案。
您可以在 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
请注意,您需要验证插件是否已正确构建和签名。 我还没有遇到问题,但更复杂的构建可能会。 另请注意,这仅适用于客户端直接上传到应用商店,我没有尝试任何其他类型的签名。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.