Format of deviceToken while sending a SimpleApnsPushNotification

46 views
Skip to first unread message

Manasa Salla

unread,
Aug 24, 2020, 7:13:27 AM8/24/20
to pushy

Hi,

I am migrating from java apns to Pushy and I have modified the code to support it, while started testing, I always get a response of "BadDeviceToken", where as this token was working fine using the java apns.

My device token is in the below format - C47C16CF12FFA96A9A0276D32***********F6D37F264D715A3BFF1491C13B

Do we have to send the device token in any specific format to Pushy?


Thanks,
Manasa

Jon Chambers

unread,
Aug 24, 2020, 10:49:09 AM8/24/20
to pushy
Yes, tokens must be in the format specified in Apple's docs. TokenUtil#sanitizeToken will do that for you. That said, it loooooooks like your token is already in the right format to me, and so I'm guessing something else is going wrong. A common source of trouble is using production device tokens in the sandbox environment or vice versa.

-Jon

Manasa Salla

unread,
Aug 25, 2020, 6:27:51 AM8/25/20
to pushy
Yes,
 The issue is with the application has the distribution profile and am using the DEV APNS Host for pushing the notifications, which is why it failed, later I have updated to the PROD APNS Host and it worked.

Thanks!
Manasa
Reply all
Reply to author
Forward
0 new messages