Xcode 14编译Bundle类型报错 Signing for "xxxx" requires a development team.

1,570 阅读1分钟

今天闲来无事升级了下Xcode 14

愉快的跑一下代码 哦豁 编译报错 799C02E6-E66A-46F2-996E-2723D3C6E994.png

Signing for "xxxx" requires a development team. Select a development team in the Signing & Capabilities editor.

猜想是Xcode14MachO类型为Bundle的签名策略做了调整

image.png

解决方案

在PodFile中增加如下:

post_install do |installer|
  installer.pods_project.targets.each do |target|
    # 针对Bundle类型的做强制不签名
    if target.respond_to?(:product_type) and target.product_type == "com.apple.product-type.bundle"
      target.build_configurations.each do |config|
          config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
      end
    end
  end
end

参考资料

GitHub