Unable to build app using cordova-plugin-firebaseex 14.2.1-cli with Xcode 14 and Cordova CLI
See original GitHub issueBug report
CHECKLIST
-
I have read the issue reporting guidelines
-
I confirm this is a suspected bug or issue that will affect other users
- I have reproduced the issue using the example project or provided the necessary information to reproduce the issue.
To reproduce:
git clone https://github.com/dpa99c/cordova-plugin-firebasex-test
npm install
cordova platform add android
cordova platform add ios
cordova build ios --device --debug
Expected output is a successful build. Actual error output is (NOTE this isn’t the full output just the errors):
~/othersrc/cordova-plugin-firebasex-test/platforms/ios/FirebaseTest.xcodeproj: error: Signing for "FirebaseTest" requires a development team. Select a development team in the Signing & Capabilities editor. (in target 'FirebaseTest' from project 'FirebaseTest')
~/othersrc/cordova-plugin-firebasex-test/platforms/ios/Pods/Pods.xcodeproj: error: Signing for "gRPC-C++-gRPCCertificates-Cpp" requires a development team. Select a development team in the Signing & Capabilities editor. (in target 'gRPC-C++-gRPCCertificates-Cpp' from project 'Pods')
~/othersrc/cordova-plugin-firebasex-test/platforms/ios/Pods/Pods.xcodeproj: error: Signing for "GoogleSignIn-GoogleSignIn" requires a development team. Select a development team in the Signing & Capabilities editor. (in target 'GoogleSignIn-GoogleSignIn' from project 'Pods')
~/othersrc/cordova-plugin-firebasex-test/platforms/ios/Pods/Pods.xcodeproj: error: Signing for "FirebaseInAppMessaging-InAppMessagingDisplayResources" requires a development team. Select a development team in the Signing & Capabilities editor. (in target 'FirebaseInAppMessaging-InAppMessagingDisplayResources' from project 'Pods')
** ARCHIVE FAILED **
- I have read the documentation thoroughly and it does not help solve my issue.
- I have checked that no similar issues (open or closed) already exist.
Current behavior:
We’re in the process of upgrading a Cordova-based app to use the latest plugins, lastest XCode, etc. When I update the project to use cordova-plugin-firebaseex 14.2.1-cli, the iOS build is failing.
I’ve been able to reproduce the issue with the dpa99c/cordova-plugin-firebasex-test
repo. See steps above.
Our app fails to build with a similar message to the dpa99c/cordova-plugin-firebasex-test
:
~/src/MYAPP/platforms/ios/Pods/Pods.xcodeproj: error: Signing for "GoogleSignIn-GoogleSignIn" requires a development team. Select a development team in the Signing & Capabilities editor. (in target 'GoogleSignIn-GoogleSignIn' from project 'Pods')
Expected behavior:
iOS build completes without errors
Steps to reproduce:
Build steps for our app are similar to the reproduction steps specified above with the test repo.
Screenshots
Environment information
- Cordova CLI version
- 11.0.0
- Cordova platform version
android 11.0.0
ios 6.2.0
Available platforms:
browser ^6.0.0
electron ^3.0.0
osx ^6.0.0
- Plugins & versions installed in project (including this plugin)
cordova-android-play-services-gradle-release 4.0.0 "cordova-android-play-services-gradle-release"
cordova-android-support-gradle-release 3.0.1 "cordova-android-support-gradle-release"
cordova-custom-config 5.1.1 "cordova-custom-config"
cordova-plugin-android-tv 1.0.0 "AndroidTVPlugin"
cordova-plugin-androidx-adapter 1.1.3 "cordova-plugin-androidx-adapter"
cordova-plugin-app-version 0.1.14 "AppVersion"
cordova-plugin-battery-status 2.0.3 "Battery"
cordova-plugin-calendar 5.1.6 "Calendar"
cordova-plugin-camera 6.0.0 "Camera"
cordova-plugin-certificates 0.6.4 "Certificate Plugin"
cordova-plugin-device 2.1.0 "Device"
cordova-plugin-email-composer 0.10.1 "EmailComposer"
cordova-plugin-file-transfer 2.0.0-dev "File Transfer"
cordova-plugin-file 7.0.0 "File"
cordova-plugin-firebasex 14.2.1-cli "Google Firebase Plugin"
cordova-plugin-ionic-keyboard 2.2.0 "cordova-plugin-ionic-keyboard"
cordova-plugin-network-information 3.0.0 "Network Information"
cordova-plugin-tts 0.2.3 "TTS"
cordova-plugin-whitelist 1.3.5 "Whitelist"
cordova-plugin-wkwebview-file-xhr 3.1.0 "Cordova WKWebView File XHR Plugin"
- Dev machine OS and version, e.g.
Macbook Pro 2021 M1
ProductName: macOS
ProductVersion: 12.6
BuildVersion: 21G115
Runtime issue N/A
Android build issue: N/A
iOS build issue:
- Node JS version
- v16.15.0
- XCode version
- 14.0 (14A309)
Related code:
insert any relevant code here such as plugin API calls / input parameters
Console output
console output
// Paste any relevant JS/native console output here
Other information:
Issue Analytics
- State:
- Created a year ago
- Comments:27 (5 by maintainers)
I was able to workaround this issue with a combination of a cordova hook & pods post_install script.
It seems like XCode 14 changed the default of
CODE_SIGNING_ALLOWED
option fromNO
toYES
. A pods post_install script can be used as a workaround, to set it toNO
. (More infos: https://github.com/CocoaPods/CocoaPods/issues/11402#issuecomment-1201464693)We can add the required post_install script with a cordova hook (similiar to the approach described here: https://github.com/dpa99c/cordova-plugin-firebasex/issues/735#issuecomment-1180019463).
My final configuration / fix looks like this:
Add a hook to the
ios
platform insideconfig.xml
:The hook itself looks like this:
There is probably a more sensible way to fix the problem. In the meantime, this might help some of you to get your builds going again 😃
Ok, indeed
cordova-plugin-add-swift-support
is not needed since cordova-iod 6.2.0 (thanks @dpa99c for pointing that out). By updating plugins that overwrote Podfile for Swit support, it’s now preparing/building OK (at least concerning Swift support)