firebase-ios-sdk
firebase-ios-sdk copied to clipboard
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:
- Add
FIrebaseInAppMessaging
pod toPodfile
- Run
pod install
- Build iOS project in Xcode 14.
- 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.
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.
This is not Firebase related bug - happens with other pods too. Workaround: https://github.com/CocoaPods/CocoaPods/issues/8891
Thanks for the discussion so far. Is there something different between Xcode 13 and Xcode 14?
@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
- Cloned project on our CI machine with Xcode 13.4.1 (13F100)
-
pod install
- Build
- Build is fine
Xcode 14.0
- Cloned project on a development machine with Xcode 14.0 Beta (14A5228q)
-
pod install
- Build
- 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.
@minlite Facing the same issue here
facing same issue
facing same issue
This is a CocoaPods/Xcode issue. See https://github.com/CocoaPods/CocoaPods/issues/11402. Please add a reaction instead of another comment, unless you have something to add about the workaround(s) or resolution.
The Xcode14.0Beta2 fixed the problem.
The Xcode14.0Beta2 fixed the problem.
I am on beta 2 and I still see these error
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
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
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
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
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?
Should be fixed with CocoaPods 1.12.0. See https://github.com/CocoaPods/CocoaPods/issues/11402