onmyway133 / PushNotifications

🐉 A macOS, Linux, Windows app to test push notifications on iOS and Android
https://onmyway133.com
Other
2.26k stars 176 forks source link

Wrong device token. iOS device token cannot contain special characters. #41

Closed jarvis32123 closed 4 years ago

jarvis32123 commented 4 years ago

When entering a Firebase Cloud Messaging device token to send an iOS push notification I get this error:

Failed: Wrong device token. iOS device token cannot contain special characters. It must be a string with 64 hexadecimal symbols. Example: "03ds25c845d461bcdad7802d2vf6fc1dfde97283bf75cn993eb6dca835ea2e2f"

The FCM token is longer and has special characters. Does this mean this app doesn't work with FCM?

Ariandr commented 4 years ago

Hi @jarvis32123 Yes, you are right. The app doesn't work with FCM.

It sends push notifications directly to APN services using their native API. It has nothing to do with Firebase and its infrastructure.

APN services accept the native device token the iOS app gives you, when you register for push notifications, not Firebase token.

As I know, you can test push notification directly through Firebase using FCM tokens.