Posts

Post marked as solved
4 Replies
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.
Post not yet marked as solved
15 Replies
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.
Post not yet marked as solved
18 Replies
I figured out an alternative approach that I described here. - https://stackoverflow.com/a/64139830/2650641 Still finding its loopholes though.
Post not yet marked as solved
13 Replies
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.
Post not yet marked as solved
14 Replies
Now I know! Thanks a lot!!