onmyway133 / PushNotifications

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

(Simulator only) Wrong device token. iOS device token cannot contain special characters. It must be a string with 64 hexadecimal symbols. #45

Closed efecantekin closed 4 years ago

efecantekin commented 4 years ago

Hello,

I got my simulator's identifier on Xcode's simulator screen. Then paste this id(BB1ZZ4T5-QQFE-62E2-9B52-DF53604GASES) to app and I got error in title.

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

When I convert my bundle id to hex, it counts 72 char.

How can I solve this problem?

Thank you,

Ariandr commented 4 years ago

Hi @efecantekin You are trying to send a remote push notification to the simulator, which is impossible now.

Starting from Xcode 11.4 Apple allowed to do it only locally on the simulator. But if you want to test the remote push notification, you will steel need to use a real device.

Using a simulator you can either send a push via a command or by dropping an .apns file on your simulator.

More details here: https://www.donnywals.com/testing-push-notifications-in-the-simulator-with-xcode-11-4/