-
-
Notifications
You must be signed in to change notification settings - Fork 473
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
Unable to build app using cordova-plugin-firebaseex 14.2.1-cli with Xcode 14 and Cordova CLI #766
Comments
Are you sure you have selected a development team in the Signing & Capabilities editor? Could you provide a screenshot of this? |
I have the same problem. Using Volt Buid (Xcode 14) with 14.2.1-cli. With older versions of Xcode was no problem. |
We're experiencing the same problem both with 14.0.0-cli and 14.2.1-cli after updating to Xcode 14. EDIT |
I have a similar problem with xcode 14.0.1 and building using Fastlane. With this plugin added my project no longer has a development team automatically selected. Removing this plugin stops the issue from happening and my automatic signing/provisioning works again. |
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 We can add the required post_install script with a cordova hook (similiar to the approach described here: #735 (comment)). My final configuration / fix looks like this: Add a hook to the <hook src="hooks/firebaseDeploymentTargetFix.js" type="after_prepare" /> The hook itself looks like this: #!/usr/bin/env node
// Workaround for https://github.com/dpa99c/cordova-plugin-firebasex/issues/766
// set CODE_SIGNING_ALLOWED to NO to avoid signing errors during CI Builds
const fs = require("fs");
const path = require("path");
const execa = require("execa");
module.exports = (context) => {
const platformPath = path.resolve(context.opts.projectRoot, "platforms/ios");
const podfilePath = path.resolve(platformPath, "Podfile");
if (!fs.existsSync(podfilePath)) {
console.log(`'${podfilePath}' does not exist. Firebase deployment fix skipped.`);
return;
}
let podfileContent = fs.readFileSync(podfilePath, "utf-8");
if (podfileContent.indexOf("post_install") == -1) {
podfileContent += `
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
`;
fs.writeFileSync(podfilePath, podfileContent, "utf-8");
return execa("pod", ["install", "--verbose"], {
cwd: platformPath,
});
}
}; 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 :) |
@jkorrek Thank you for the detailed workaround instructions! |
This is a long shot, is there anyone who is having this issue that applied the workaround that also uses BrowserStack's App Live for on-device testing? When we build our apps with the workaround and the cordova-plugin-firebaseex 14.2.1-cli, they are killed immediately on launch when running in App Live. BrowserStack support said it is something related to the aps-environment entitlement when they resign the app to run on their hardware. Our apps run fine on App Live when we build with cordova-plugin-firebaseex version 13.0.1-cli. Just wondering the problem is being caused by the workaround or some change that's part of 14.2.1-cli. Thanks for listening! :) |
@ndrake I am using Volt Build for building and I didn't applied (also not possible on this platform) workaround but I experience the same problem as you. App crash on the start, with older version of firebase plugin (14.0.0-cli) app start but does not receive any notifications form firebase. FCM token is produced and message is successfully sent (api and firebase console) but in the app there is no notification arising. With older Xcode version there was no problem. |
Well, we released to production and started getting a bunch of crashes (that we couldn't easily reproduce). Crash logs seemed to indicate it was because the Swift runtime was getting embedded in the app. I've noticed that when building with 14.2.1-cli, the XCode project includes the build setting Bonus mystery, our build.json does specify |
Final update, setting |
Unfortunately i am having the same problem. I have the latest version of cordova and xcode. :( |
We're still having this issue - none of the workarounds above have resolved the issue. While adding Setting this does not make a difference in our testing:
Outside of the people in this thread, I know at least 5 users who are stuck using Xcode 13 until this is resolved. Is there any more information which could help resolve this? |
Hello @dpa99c , why did you close this ? I'm encountering that error on 15.0.0-cli |
@QuentinFarizon it's closed because AFAIK it's fixed - here's the console output for a successful CLI build of the example project using Xcode 14 and If you are still encountering build issues with your own project, I suggest attempting to build the example project since it's a known codebase and therefore rule out the possibility of project-specific issues such as conflict with another plugin. If the build of the example project is unsuccessful, this suggests an issue with your build environment. |
Hello, thanks @dpa99c. Here is the log :
|
Bitrise is a remote build environment and as outlined in the documentation, this plugin will not work in such environments if they do not support Cordova hook scripts which are essential for this plugin to function correctly. I don't know if Bitrise supports Cordova hook scripts - you'd have to check - but I highly recommend a local build environment which you have full control over. I'm unable to offer support for projects in a remote build environment which is not under your direct control or where the example project cannot be built as a known working test case to validate the build environment. |
Yes it fully supports Cordova hooks script, I'm using dozens of Cordova plugins inclusing yours, and had no issue with remote builds on Bitrise for 3 years |
The errors in your build log indicate either the build script, or the pod post-install script it injects into the
This issue was raised because CLI builds with Xcode 14 were failing because Xcode 14 made changes to the default Xcode project settings. If I open Therefore given the output in your build log, I would conclude this step is failing. In a local build environment, you could manually inspect the If the And should be able to confirm if the |
@QuentinFarizon this issue with Bitrise could be the same that is affecting @gwhenne when building using the VoltBuilder remote build service so keep an eye on his feedback in #780 |
@dpa99c Yes, I do also have :
But not |
@dpa99c I'm seeing that post-install block is conditionned by a check that no post_install step already exists : 94445be#diff-4c63363a4ed67bec213b7a24798f0661d2997a4eab3fabc8be02b1b1ab18be08R192 But I do already have one (probably by cordova-plugin-add-swift-support) :
So modifications by your plugins are just skipped |
Yes, the presence of a As an aside, is |
Yes, |
It appears VoltBuilder jobs are getting past the hook step successfully, based on the messages in the log. The current problem is later in the build, at the Code Signing step. The tests I am running do not use |
Sorry, it wasn't I'm currently trying to patch other plugin(s?) interfering with post_install step in Podfile |
Ok, indeed |
The only way I was able to resolve this in an automated fashion (I'm using fastlane on jenkins) was to let cordova install the iOS platform, update the Podfile with the As far as I know, this cannot be done using a cordova hook because you'd need one that runs after the Add the following to a file called
Create a bash script with the following:
At this point you should be able to build the project. |
Bug report
CHECKLIST
I have read the issue reporting guidelines
I confirm this is a suspected bug or issue that will affect other users
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):
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
Runtime issue
N/A
Android build issue:
N/A
iOS build issue:
Related code:
Console output
console output
Other information:
The text was updated successfully, but these errors were encountered: