带电容器的 Ionic 4:xcodebuild 因手动签名过程而失败 [英] Ionic 4 with capacitor: xcodebuild fails with manual signing process
问题描述
我正在尝试构建 iOS 版本的 Ionic 应用程序,该应用程序在我的持续集成系统 (Azure) 中使用电容器.
I'm trying to build the iOS version of an Ionic app which uses capacitor in my continuous integration system (Azure).
这是我得到的输出:
/usr/bin/xcodebuild -sdk iphoneos -configuration Release -workspace /Users/runner/runners/2.160.1/work/1/s/ios/App/App.xcworkspace -scheme App build CODE_SIGN_STYLE=Manual CODE_SIGN_IDENTITY=iPhone Distribution: <not_displayed> (ENT) PROVISIONING_PROFILE=5254b426-4af0-45e7-aeab-ec63a303d250 PROVISIONING_PROFILE_SPECIFIER=
Build settings from command line:
CODE_SIGN_IDENTITY = iPhone Distribution: swiss1mobile ag (ENT)
CODE_SIGN_STYLE = Manual
PROVISIONING_PROFILE = 5254b426-4af0-45e7-aeab-ec63a303d250
PROVISIONING_PROFILE_SPECIFIER =
SDKROOT = iphoneos13.1
note: Using new build system
note: Planning build
note: Constructing build description
error: Capacitor does not support provisioning profiles. Capacitor does not support provisioning profiles, but provisioning profile ent_frontwork has been manually specified. Set the provisioning profile value to "Automatic" in the build settings editor. (in target 'Capacitor' from project 'Pods')
error: CapacitorCordova does not support provisioning profiles. CapacitorCordova does not support provisioning profiles, but provisioning profile ent_frontwork has been manually specified. Set the provisioning profile value to "Automatic" in the build settings editor. (in target 'CapacitorCordova' from project 'Pods')
error: Pods-App does not support provisioning profiles. Pods-App does not support provisioning profiles, but provisioning profile ent_frontwork has been manually specified. Set the provisioning profile value to "Automatic" in the build settings editor. (in target 'Pods-App' from project 'Pods')
** BUILD FAILED **
我一直在寻找,但没有运气.有什么线索吗?
I've been searching a lot but no luck. Any clue?
推荐答案
一个小变通办法解决了这个问题.我在 Github 中发现了 this 问题,因为更新导致了类似的错误可可豆.我觉得它有点hacky,但它有效.我不确定 Azure 是否应该修复其 xcode 任务以避免这些错误,但就目前而言,这已经足够了.
A little workaround fixes this problem. I found this issue in Github for a similar error caused by an update in cocoapods. I find it a bit hacky, but it works. I'm not sure if Azure should fix its xcode task to avoid these errors, but for now, this is good enough.
所以修复只是将这段代码添加到 Podfile 中:
So the fix is just adding this code to the Podfile:
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['EXPANDED_CODE_SIGN_IDENTITY'] = ""
config.build_settings['CODE_SIGNING_REQUIRED'] = "NO"
config.build_settings['CODE_SIGNING_ALLOWED'] = "NO"
end
end
end
这样就不必对 pod 进行签名,并且不再显示错误并且构建了应用程序.
This way the pods don't have to be signed, and the error is not shown anymore and the app is built.
这篇关于带电容器的 Ionic 4:xcodebuild 因手动签名过程而失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!