After some headbanging tonight to find why I wasn’t receiving my test push notifications I found out that it’s actually a much bigger issue affecting all iOS 13 users!
deviceToken fields of the
DeviceRegistration table looks like this:
This obviously isn’t a valid device token! After digging a little bit I found out that the reason is that your iOS SDK uses
[NSData description] (albeit implicitly by using
[NSString stringWithFormat:@"%@", token]) to convert the token to
NSString. However, this is unreliable since what
description returns can change. And indeed it did change in iOS 13!
For more info see the comments of this answer: https://stackoverflow.com/questions/9372815/how-can-i-convert-my-device-token-nsdata-into-an-nsstring/9372856#9372856
Please treat this issue with the needed priority as it effectively prevents almost all iOS users from receiving push notifications!