question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Firebase cordova Notifications

See original GitHub issue

Trying to set up the firebase notification service - i have migrated my service from Ionic 3 to my new ionic 4 project.

The only difference being that when I ran ‘npm install --save cordova-plugin-firebase’ it breaks my app giving this useless error in xcode:

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[PHTPhenotypeDatabase committedStateForSingleCommitPackage:version:user:error:]: unrecognized selector sent to instance 0x2807d9180' *** First throw call stack: (0x1d6b6fef8 0x1d5d3da40 0x1d6a87154 0x1d6b75810 0x1d6b774bc 0x1013c8774 0x1013da870 0x1013da450 0x1013da358 0x1024a7840 0x1024a8de4 0x1024b0e88 0x1024b1b7c 0x1024bbc18 0x1d678a0f0 0x1d678cd00) libc++abi.dylib: terminating with uncaught exception of type NSException (lldb)

I did run ‘npx cap sync’ after and still no difference

Does the firebase cordova plugin not work with capacitor?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:19 (5 by maintainers)

github_iconTop GitHub Comments

5reactions
jcesarmobilecommented, Jul 24, 2019

The Firebase SDKs when served as .frameworks (as firebase plugin does) need -ObjC flag to work, otherwise it shows the [PHTPhenotypeDatabase committedStateForSingleCommitPackage:version:user:error:]: unrecognized selector sent crash.

Cordova has it by default, but for Capacitor you have to configure it like this.

"ios": {
    "cordovaLinkerFlags": ["-ObjC"]
  }

But I don’t think all plugin features will work fine as the plugin does method swizzling and that usually doesn’t work well.

2reactions
MSchmackcommented, Jan 23, 2019

Experiencing the same issue

2019-01-23 14:42:28.689113+0100 App[680:126656] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[PHTPhenotypeDatabase committedStateForSingleCommitPackage:version:user:error:]: unrecognized selector sent to instance 0x283e044c0'
*** First throw call stack:
(0x1be048ec4 0x1bd219a40 0x1bdf61c24 0x1be04e7dc 0x1be05048c 0x101706b94 0x101718c90 0x101718870 0x101718778 0x10265b824 0x10265cdc8 0x102664e6c 0x102665b60 0x10266fbfc 0x1bdc650dc 0x1bdc67cec)
libc++abi.dylib: terminating with uncaught exception of type NSException
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to add Push Notifications in your Cordova application ...
2. Configuring Firebase for Push Notifications. First, head over to Firebase console. Sign in with your Google account to enter the console. If...
Read more >
cordova-plugin-firebase-messaging - npm
Clear all notifications from system notification bar. Example. cordova.plugins.firebase.messaging.
Read more >
Implement Push Notifications For Cordova Apps [Top 3 Ways]
This step-by-step guide (with screenshots) will show you how to set up mobile push notifications for your Cordova app using Firebase, OneSignal &...
Read more >
cordova-plugin-firebase/NOTIFICATIONS.md at master - GitHub
Notifications. Read below for details on configuring notification icons and colors. Changing Notification Icon. By default Firebase will use the app icon as ......
Read more >
Simple guide for Cordova Push Notifications ... - ConnectyCube
Android · Create and configure your Firebase project and obtain the Server key. · Copy your FCM server key to your Dashboard >>...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found