nativescript-plugin-firebase
nativescript-plugin-firebase copied to clipboard
Not receiving FCM push notifications on iOS, but can receive from APNS
Hi, I'm running on iOS device (NS/iOS 5.2). The onPushTokenReceivedCallback is returning 2 different tokens on init, one for APNS and another one for FCM.
If I use the Pusher tool on Mac, and use the APNS token, I do get the notification on device.
However if I use the FCM token, the curl returns a success which means the device token is actually registered, but I do not get any notifications at all.
Any ideas of what could be wrong? This is the CURL (taken from example files) and my config file:
curl -X POST --header "Authorization: key=AAAA...:xxxxxx...." --Header "Content-Type: application/json" https://fcm.googleapis.com/fcm/send -d "{\"data\":{\"foo\":\"bar\"}, \"priority\": \"High\", \"content_available\":true, \"to\": \"euxZqvnMaI0:APA91bFFAhvnO5MnpOo39JJCLYhsiuRImhxMoo5AlDo_6J872MujbE7VfVFFVaQ0OSNPDW_VRsx0mcBf85gAbg3uK1bL0HyGvKEkm1jUppG2juOc_OfDvccedMVRIuTe8vjOGjqGQ2L6\"}"
{"multicast_id":5492834173422874287,"success":1,"failure":0,"canonical_ids":0,"results":[{"message_id":"0:1550509111206737%f5a30ca3f5a30ca3"}]}
{
"external_push_client_only": false,
"using_ios": true,
"using_android": true,
"firestore": false,
"realtimedb": false,
"authentication": false,
"remote_config": false,
"performance_monitoring": false,
"messaging": true,
"crashlytics": true,
"crash_reporting": true,
"storage": false,
"functions": false,
"facebook_auth": false,
"google_auth": false,
"admob": false,
"invites": false,
"dynamic_links": false,
"ml_kit": false
}
did you ever solve this? I have the same problem
Not really, but as a workaround I save and use only the APNS token. I do a fixed length comparison, since FCM tokens are longer.
just to update: I solved the issue by removing nativescript-facebook and instead authenticate users through firebase fb. It was conflicting with nativescript-firebase
Experienced same problem, push notification on iOS wasn't working. As soon as I deleted nativescript-facebook plugin, it started to work. Even though I was seeing message coming in, in the callback.
i faced same issue, but i didn't use "nativescript-facebook" anybody know how to fix it in my case?