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?
@oliverandersencox what's the point of using Cordova's plugin in place of Capacitor's native one?
Getting the same here:
(...)
2018-11-04 13:02:20.827577-0300 App[3667:1007385] Registering Plugin CAPWebViewPlugin
2018-11-04 13:02:20.833995-0300 App[3667:1007412] - <AppMeasurement>[I-ACS036001] Analytics screen reporting is disabled. UIViewController transitions will not be logged.
2018-11-04 13:02:20.947982-0300 App[3667:1007413] -[PHTPhenotypeDatabase committedStateForSingleCommitPackage:version:user:error:]: unrecognized selector sent to instance 0x280d1cb00
2018-11-04 13:02:20.948139-0300 App[3667:1007413] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[PHTPhenotypeDatabase committedStateForSingleCommitPackage:version:user:error:]: unrecognized selector sent to instance 0x280d1cb00'
*** First throw call stack:
(0x1a6b57ef8 0x1a5d25a40 0x1a6a6f154 0x1a6b5d810 0x1a6b5f4bc 0x10287f79c 0x102891898 0x102891478 0x102891380 0x103887840 0x103888de4 0x103890e88 0x103891b7c 0x10389bc18 0x1a67720f0 0x1a6774d00)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
Reproduction:
npm install cordova-plugin-firebasenpx cap update iosHas anyone got this working?
@leshik the capacitor notifications plugin does not work with Firebase cloud messages - unless I am wrong and there is a way to do this @jcesarmobile
@oliverandersencox Uh, dunno – I was able to make pushes work on iOS and Android with capacitor's native plugin using FCM in case of Android. Don't know about Electron notifications though.
Getting the same error. Any updates on this?
same error here, but using firebase-messaging plugin with cordova
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
Any update or solution for this issue ?
Seeing this error myself - any ideas?
same errors, has any solution for this?
Same error!!! help!!!
I have the same error. Any solution?
Me too!
Me too :(
Check this out
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.
The Firebase SDKs when served as .frameworks (as firebase plugin does) need
-ObjCflag to work, otherwise it shows the[PHTPhenotypeDatabase committedStateForSingleCommitPackage:version:user:error:]: unrecognized selector sentcrash.Cordova has it by default, but for Capacitor you have to configure it like this.
"ios": { "cordovaLinkerFlags": ["-ObjC"] }
Hi @jcesarmobile, Where can I add this? I'm having the same issue as well.
In the capacitor.config.json
Most helpful comment
The Firebase SDKs when served as .frameworks (as firebase plugin does) need
-ObjCflag to work, otherwise it shows the[PHTPhenotypeDatabase committedStateForSingleCommitPackage:version:user:error:]: unrecognized selector sentcrash.Cordova has it by default, but for Capacitor you have to configure it like this.
But I don't think all plugin features will work fine as the plugin does method swizzling and that usually doesn't work well.