How to Solve Xcode 14 Pod Signature Error

Background:

After pod install with Xcode 14, If there are bundle resource files in the library, an error will be reported during compilation, error: “igning for “xxxxx” requires a development team. Select a development team in the Signing & Capabilities editor.”

Solution:

Option 1:
Set the bundle identifier and team for the pod library that reported the error one by one.

Disadvantages: Our configuration will disappear after each execution of pod install, Need to manually set it again

Option 2:

Add the following configuration in Podfile, add and then re-pod update

post_install do |installer|
  installer.generated_projects.each do |project|
    project.targets.each do |target|
        target.build_configurations.each do |config|
            config.build_settings["DEVELOPMENT_TEAM"] = " Your Team ID &# 34;
         end
    end
  end
end

If you don’t want to set a specific team ID, try the following configuration:

post_install do |installer|
  installer.pods_project.targets.each do |target|
    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

The above solution comes from: https://github.com/CocoaPods/CocoaPods/issues/11402

Read More:

Leave a Reply

Your email address will not be published. Required fields are marked *