Now I know! Thanks a lot!!
Post
Replies
Boosts
Views
Activity
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.
I filed a Feedback regarding this and Apple closed it saying it is an expected behavior without any proper clarification. Such a waste!
I figured out an alternative approach that I described here. - https://stackoverflow.com/a/64139830/2650641 Still finding its loopholes though.
I tried some approach that worked for me and I have described it here. - https://stackoverflow.com/a/64139830/2650641 Still finding its loopholes though.
I tried some approach that worked for me and I have described it here. - https://stackoverflow.com/a/64139830/2650641 Still finding its loopholes though.
I tried some approach that worked for me and I have described it here. - https://stackoverflow.com/a/64139830/2650641 Still finding its loopholes though.