davide-scalzo / react-native-mixpanel

A React Native wrapper for Mixpanel tracking
MIT License
454 stars 194 forks source link

iOS push notifications with FCM #138

Open sharifhh opened 6 years ago

sharifhh commented 6 years ago

Hello i set my iOS notification with firebase, how can i tell mixpanel that??

It needs the iOS original token to send using APN but i dont want that.

is there a way? or i should implement two notification handlers one for android and one for ios?

0hio-creator commented 4 years ago

I asked Mixpanel about this 30/May/2020

Their response below. Doesn't seem possible currently

Hi @marc1111222333 , Mixpanel does not currently support sending push notifications via FCM because it generates tokens that are different from APNs. I've gone ahead and converted this question into an idea, so that we can submit a product gap on your behalf to get Firebase support for sending iOS pushes in Mixpanel. In the meantime, if you choose to setup APNs for iOS pushes, we have instructions here ( https://developer.mixpanel.com/docs/ios-push-notifications ) on how to set up APNs certificate for iOS pushes.

MarcusOhman91 commented 4 years ago

If you are using react-native-firebase library, you can use it to retrieve APNS token const apnsToken = await firebase.messaging().ios.getAPNSToken(); (this is using version 5.5.7) But you still need to setup apple push certificate, as stated here: https://developer.mixpanel.com/docs/ios-push-notifications