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
onNotification not working on iOS 9 #17
Comments
Ok my bad. It works on iOS if I use "notification" and not "data". The thing is, if I use the "notification" key to send to a topic then Android will received the "notification" and not the "data"... Should I create separate topics for iOS and Android ?? Doesn't seem right... |
It only works when the app is in background though... Nothing happens when app is in foreground. onNotification is never called |
Sry @mparpaillon, I'm sorry, I currently have no device to test it on. |
Wow thanks a lot ! I'm checking this right now. |
Ok it's definitely better. Here's the current state: on iOS (9.3.5 in my case):
on Android:
So I guess I need to send separately my push notifications because if I send one with "data" and "notification" I won't get my fancy notification on Android. I think I'll have to duplicate my topics for Android and iOS so I can send basic notification for iOS and fancy ones for Android. I can close this now since I don't think it can get any better. |
@andrehtissot Since your plugin is creating the fancy notification by reading the "data" property, I guess that, somewhere in your code, you have to decide whether you create a basic notification via "notification" property or a fancy one by reading the "data" property. Or is that some magic on FCM plugin side ? If that's the case maybe you could prioritize the fancy notification instead of the basic one ? Maybe that's the place ? cordova-plugin-firebase-extended-notification/src/android/MessagingService.java Lines 16 to 28 in 68f9418
Also, some doc from Firebase: https://firebase.google.com/docs/cloud-messaging/concept-options |
I'll take a look at it. |
The guide says that when the app is not in the foreground and there is both So if the And sadly (again), according to the guide, the IOS only shows Unfortunately, I don't see any answer other than sending only with the What do you think? Do you see another way? |
Yup, sadly I've come to the same conclusion :( Thanks a lot for looking into it ! |
Hi,
The plugin works great on Android but I don't manage to make it work on iOS. I tried sendToTopic and sendToDevice via Firebase admin but nothing worked.
My APN auth key is loaded on Firebase, I have enabled the Push capabilities via Xcode, I use a good certificate. But it doesn't work.
Is that a bug ?
Thanks
The text was updated successfully, but these errors were encountered: