ios - 带电容器的 Ionic 4:xcodebuild 因手动签名过程而失败
问题描述
我正在尝试构建 Ionic 应用程序的 iOS 版本,该应用程序在我的持续集成系统(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 **
我一直在寻找很多,但没有运气。有什么线索吗?
解决方案
一个小解决方法可以解决这个问题。我在 Github 中发现了这个问题,因为 cocoapods 的更新导致了类似的错误。我觉得它有点hacky,但它有效。我不确定 Azure 是否应该修复它的 xcode 任务以避免这些错误,但现在,这已经足够好了。
所以修复只是将此代码添加到 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 进行签名,并且不再显示错误并且构建了应用程序。
推荐阅读
- sql - CTE 获取根名称
- python-3.x - 使用 Python 3.x 和 SpaCy 从文本中编辑名称的问题
- python - 使用python将一组重复的列转换为一列
- flutter - 在 Flutter 中实现折叠工具栏
- javascript - Gatsby 错误 [HPM] 尝试将请求 / 从 localhost:8000 代理到 http://localhost:4000 时发生错误(ECONNREFUSED)
- css - 在 Squarespace 上更改一页的背景
- c# - C# Selenium javascript 删除元素不起作用
- react-native - 如何从嵌套的 toptabnavigator 导航到父 StackNavigator?
- rust - Rust 是否正式区分了将编译时检查换成运行时检查的结构?
- python - python中对象和方法的递归