[Ionic 4] Best way to implement push notifications?

#1

Hey,

I was wondering what is the best way to implement push notifications on iOS with Ionic.

I’m struggling with this since a long time and never succeed. It looks like both FCM and FirebaseMessaging plugins are conflicting in ios and I couldn’t directly use firebase library.

I’m handling user authentification with cordova-plugin-firebase, so I need it to be compatible.

When building with cordova-plugin-firebase-messaging, I get this error :

ld: warning: directory not found for option '-L/Users/me/Library/Developer/Xcode/DerivedData/My-Project-fkvzdvzecsfhqzhpfyinlvud/Build/Products/Debug-iphoneos/FirebaseCore'
ld: warning: directory not found for option '-L/Users/me/Library/Developer/Xcode/DerivedData/My-Project-fkvzdvzecsfhqzhpfyinlvud/Build/Products/Debug-iphoneos/FirebaseMessaging'
ld: warning: directory not found for option '-L/Users/me/Library/Developer/Xcode/DerivedData/My-Project-fkvzdvzecsfhqzhpfyinlvud/Build/Products/Debug-iphoneos/GoogleUtilities'
ld: warning: directory not found for option '-L/Users/me/Library/Developer/Xcode/DerivedData/My-Project-fkvzdvzecsfhqzhpfyinlvud/Build/Products/Debug-iphoneos/Protobuf'
ld: warning: directory not found for option '-L/Users/me/Library/Developer/Xcode/DerivedData/My-Project-fkvzdvzecsfhqzhpfyinlvud/Build/Products/Debug-iphoneos/nanopb'
ld: library not found for -lFirebaseCore
clang: error: linker command failed with exit code 1 (use -v to see invocation)

After “pod install”, though I get this error :
ld: 1093 duplicate symbols for architecture arm64

With cordova-plugin-fcm, I get :
Property 'delegate' not found on object of type 'FIRMessaging

For both plugins, I have no problem in Android. I have no idea what to do.

How do you manage that in your apps ?