Open phzbox opened 6 years ago
Just adding more info:
FCM.getAPNSToken() returns an empty string. I tried to debug in the RNFIRMessaging.m and in getAPNSToken
, [deviceToken length]
is of length 0. I'm not sure where it's supposed to be set but it seems like it's not happening, and I don't get any errors.
For the code, I'm using:
async function testPush() {
FCM.on(FCMEvent.RefreshToken, token => {
console.log("TOKEN (refreshUnsubscribe)", token);
});
const r1 = await FCM.getInitialNotification()
console.log('initialNotif:', r1)
const r = await FCM.requestPermissions({
badge: false,
sound: true,
alert: true
});
console.log('permission:', r)
const fcmToken = await FCM.getFCMToken();
console.log('fcm', fcmToken)
if(Platform.OS === 'ios'){
const apnsToken = await FCM.getAPNSToken()
console.log('apns', apnsToken)
}
}
I have the same problem. I get the FCM Token and sent the push there that works, but no APNS Token on device.
does FCM.getAPNSToken() return you value on iOS 11?
yes On Thu, Apr 19, 2018 at 12:47 PM Libin Lu notifications@github.com wrote:
does FCM.getAPNSToken() return you value on iOS 11?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/evollu/react-native-fcm/issues/903#issuecomment-382804387, or mute the thread https://github.com/notifications/unsubscribe-auth/AAvjXLbEmkZaUeTUrD-RYEfAVWvmlL21ks5tqL-LgaJpZM4TYSS_ .
there isn't breaking api change from 10 to 11 that I'm aware of. try reinstall the app?
Just a quick update on this.. I tried to make it work using the native PushNotificationIOS and I wasn't getting the APNS token, so I'm still trying to figure it out.
On Thu, Apr 19, 2018 at 1:03 PM, Libin Lu notifications@github.com wrote:
there isn't breaking api change from 10 to 11 that I'm aware of. try reinstall the app?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/evollu/react-native-fcm/issues/903#issuecomment-382809431, or mute the thread https://github.com/notifications/unsubscribe-auth/AAvjXGT2eJqGi0-ElfRhGrli1P7cVPsDks5tqMNMgaJpZM4TYSS_ .
anyone crack this. getting inconsisten/weird behavior of some phones receving push and others not. trying to troubleshoot. thx. tried a full app uninstall and reinstall from store. no avail.
Hi,
I've got push notifications working on iOS11 and all android, but for some reason it's not working on iOS10.3.
Everything is configured using FCM, react-native-fcm and a .p8 certificate.
On iOS10.3, I'm simply not getting APNs notifications. It asks for the permission, I see the FCM token, but the APN part is just not triggered, neither on the foreground or background.
However, on iOS11, everything works as expected.. I can send a push notif. from the server or using the FCM UI.
Is iOS11 using a different method for APN messages which could explain this issue?
Thanks