Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FirebaseInAppMessaging code sign error on Xcode 14 #9886

Closed
minlite opened this issue Jun 7, 2022 · 17 comments
Closed

FirebaseInAppMessaging code sign error on Xcode 14 #9886

minlite opened this issue Jun 7, 2022 · 17 comments
Labels
api: inappmessaging Firebase In App Messaging beta-software Related to using beta iOS or Xcode versions. CocoaPods Xcode 14 - iOS 16 Issues and PRs related to Xcode 14, iOS 16, and associated OSes

Comments

@minlite
Copy link

minlite commented Jun 7, 2022

[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.

@google-oss-bot
Copy link

I found a few problems with this issue:

  • I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
  • This issue does not seem to follow the issue template. Make sure you provide all the required information.

@morganchen12 morganchen12 added api: inappmessaging Firebase In App Messaging and removed needs-triage labels Jun 7, 2022
@ryanwilson ryanwilson added beta-software Related to using beta iOS or Xcode versions. Xcode 14 - iOS 16 Issues and PRs related to Xcode 14, iOS 16, and associated OSes labels Jun 7, 2022
@sarsonj
Copy link

sarsonj commented Jun 8, 2022

This is not Firebase related bug - happens with other pods too. Workaround: CocoaPods/CocoaPods#8891

@paulb777
Copy link
Member

paulb777 commented Jun 8, 2022

Thanks for the discussion so far. Is there something different between Xcode 13 and Xcode 14?

@minlite
Copy link
Author

minlite commented Jun 8, 2022

@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.

@SaloniSS
Copy link

@minlite Facing the same issue here

@ashutosh-akss
Copy link

facing same issue

1 similar comment
@xiaogehenjimo
Copy link

facing same issue

@paulb777
Copy link
Member

This is a CocoaPods/Xcode issue. See CocoaPods/CocoaPods#11402. Please add a reaction instead of another comment, unless you have something to add about the workaround(s) or resolution.

@cdoky
Copy link

cdoky commented Jun 23, 2022

The Xcode14.0Beta2 fixed the problem.

@nicolas6422
Copy link

nicolas6422 commented Jul 12, 2022

The Xcode14.0Beta2 fixed the problem.

I am on beta 2 and I still see these error

@yuanxun2007
Copy link

yuanxun2007 commented Jul 14, 2022

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

@Tale-Dev
Copy link

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.

@paulocoutinhox
Copy link

paulocoutinhox commented Sep 20, 2022

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:
CocoaPods/CocoaPods#8891

@wattanakorn495
Copy link

I have tried this script, it works fine on my local machine but it does not work on codemagic CI/CD

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

@yuanxun2007
Copy link

I have tried this script, it works fine on my local machine but it does not work on codemagic CI/CD

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

please try bellow
target.build_configurations.each do |config|
config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
end

@mrazam110
Copy link

It Keeps failing on CI

config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
or 
config.build_settings["DEVELOPMENT_TEAM"] = "Your Team ID"

Both not working

Any further help on this?

@paulb777
Copy link
Member

Should be fixed with CocoaPods 1.12.0. See CocoaPods/CocoaPods#11402

@firebase firebase locked and limited conversation to collaborators Jun 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api: inappmessaging Firebase In App Messaging beta-software Related to using beta iOS or Xcode versions. CocoaPods Xcode 14 - iOS 16 Issues and PRs related to Xcode 14, iOS 16, and associated OSes
Projects
None yet
Development

No branches or pull requests