Problem with cordova-plugin-firebase

Hi,

I am trying to compile app with plugin cordova-plugin-firebase but i am getting error:
Failed to restore plugin “cordova-plugin-firebase”. You might need to try adding it again. Error: CordovaError: Using “requireCordovaModule” to load non-cordova module “xcode” is not supported. Instead, add this module to your dependencies and use regular “require” to load it.

How can i fix this? Thanks!

This appears to be a bug in cordova-plugin-firebase. There are several open issues for it. It looks like the solution has been given to the author, but he has yet to merge the change (2 years later!)

It looks like people are using cordova-plugin-firebasex instead, which is more recent. Give it a try and report back if it works!

https://github.com/arnesson/cordova-plugin-firebase/pull/1034
https://github.com/arnesson/cordova-plugin-firebase/issues/1156
https://github.com/arnesson/cordova-plugin-firebase/issues/1033

I have tried but get another error:

UserError: error: Resource “/Users/voltbuilder/Library/Developer/Xcode/DerivedData/Werkbriefje-fhyfgyviwkvisofyrcbtnbkgehru/Build/Intermediates.noindex/ArchiveIntermediates/Werkbriefje/BuildProductsPath/Debug-iphoneos/GoogleTagManager/TagManagerResources.bundle” not found. Run ‘pod install’ to update the copy resources script.

According cordova-plugin-firebasex 🚀 - Could not compile on IOS - InAppMessagingDisplayResources.bundle missing | bleepcoder.com upgrading your cocoapods installation should solve this

With using version=“9.1.1-cli” was compiling problem solved.

But after compiling and installing (ios) comes no prompt for asking for permission to receive push messages.

How can i accomplish the under mentioned in Volt.build?

1. Then you need to open Xcode project of your Cordova app and enable Push Notifications capabilities. Open Xcode, choose your project file, Signing & Capabilities tab and then add a Push Notifications capability. Also - tick a ‘Remote notifications’ checkbox in Background Modes section.

If you’re using cordova-plugin-firebasex, you will probably need something like this in your config.xml:

<plugin name="cordova-plugin-firebasex" >
  <variable name="ANDROID_FIREBASE_CONFIG_FILEPATH" value="www/google-services.json" />
  <variable name="IOS_FIREBASE_CONFIG_FILEPATH" value="www/GoogleService-Info.plist" />
</plugin>

Did you review this?

No difference

If I am reading correct this is only necessary if you want customized notifications. I want just standard notifications

It is solved.

Using
<plugin name="cordova-plugin-firebasex" version="8.0.1" >

in combination with function grantPermission

Can you give a bit more information about the function grantPermission, so the next user does not have to figure this out?

Calling on deviceready:

    var grantPermission = function(){
      FirebasePlugin.grantPermission(function(hasPermission){
        console.log("Permission was " + (hasPermission ? "granted" : "denied"));
      });
    };

Thank yout!