Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
iOS push not working for device tokens when spaces removed #212
When I register, I get the normal response:
Pushes fail whenever I try to push to the device token without spaces. Pushes go through perfectly whenever I push to the token with spaces.
To make notifications work, I had to remove the following from https://github.com/phonegap/phonegap-plugin-push/blob/7052c9ce5d3b744fabaaf402bfaafe32b25736c1/src/ios/PushPlugin.m.
Is there a reason spaces are removed from the token?
@macdonst resolved. This was caused by unregistering & re-registering tokens. Ionic is expediting un-registering a token by keeping track of them on their end, but tokens were not being re-registered. My iOS token was identical each time (unlike android), so it would fail after a single login/logout loop. Tokens with spaces worked because APNs doesn't care about spaces, and the token wasn't in ionic's list of unregistered tokens, so Ionic didn't block it. It was an anonymous token, which they allow.