firebase-ios-sdk: FirebaseInAppMessaging code sign error on Xcode 14

[REQUIRED] Step 1: Describe your environment

  • Xcode version: 14.0 Beta (14A5228q)
  • Firebase SDK version: 9.1.0
  • Installation method: Cocoapods
  • Firebase Component: InAppMessaging
  • Target platform(s): iOS

[REQUIRED] Step 2: Describe the problem

When using Xcode 14 to build an iOS project containing the InAppMessaging component, the build fails with a code signing issue:

Signing for "FirebaseInAppMessaging-InAppMessagingDisplayResources" requires a development team. Select a development team in the Signing & Capabilities editor. (in target 'FirebaseInAppMessaging-InAppMessagingDisplayResources' from project 'Pods'

Steps to reproduce:

  1. Add FIrebaseInAppMessaging pod to Podfile
  2. Run pod install
  3. Build iOS project in Xcode 14.
  4. Error is shown:

Signing for "FirebaseInAppMessaging-InAppMessagingDisplayResources" requires a development team. Select a development team in the Signing & Capabilities editor. (in target 'FirebaseInAppMessaging-InAppMessagingDisplayResources' from project 'Pods'

Quick fix

Selecting the team in the Signing & Capabilities tab of the FirebaseInAppMessaging-InAppMessagingDisplayResources project fixes the build.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 17 (3 by maintainers)

Most upvoted comments

The Xcode14.0Beta2 fixed the problem.

This post_install script in podfile fixed it. As it seems setting the own developer team is necessary. Replace Your Team ID with the TeamID of your project.

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"
         end
    end
  end
end

@sarsonj I just checked again and it does seem this is a regression with Xcode 14 (even though the root cause might be the issue you mentioned).

Xcode 13.4.1

  1. Cloned project on our CI machine with Xcode 13.4.1 (13F100)
  2. pod install
  3. Build
  4. Build is fine

Xcode 14.0

  1. Cloned project on a development machine with Xcode 14.0 Beta (14A5228q)
  2. pod install
  3. Build
  4. Build fails with the error: error build: Signing for "FirebaseInAppMessaging-InAppMessagingDisplayResources" requires a development team. Select a development team in the Signing & Capabilities editor.

@paulb777 Not sure what has changed in Xcode 14 that causes it to suddenly complain about this.

This post_install script in podfile fixed it. As it seems setting the own developer team is necessary. Replace Your Team ID with the TeamID of your project.

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"
         end
    end
  end
end

Thanks @yuanxun2007, works for me.

It works to me:

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

Reference: https://github.com/CocoaPods/CocoaPods/issues/8891