Post

Replies

Boosts

Views

Activity

Reply to iOS13 PKPushCredentials broken
You are again doing a dangerous mistake. APNS token length is not fixed and can change over time.The following code or something similar can be a feasible solution that doesn't depend on the assumed and hardcoded token length:constchar *data = [deviceToken bytes]; NSMutableString *token = [NSMutableString new]; for (NSUInteger i = 0; i < [deviceToken length]; i++) { [token appendFormat:@"%02.2hhX", data[i]]; } self.application.devicePushNotificationToken = token;And by no means any developer should use the description method of any object unless that is explicitly overriden and you know the expected outcome. That method has merely been put for debugging purpose and can change without any documentation update.
May ’20