Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GCM always returns "NotRegistered" for iOS devices

while i never had any issues with android, all my attempts for sending nofifications to iOS fail. everything is properly set up, but the gcm endpoint always returns "NotRegistered" for every iOS reg_id, even immediately after registration. however, in 1 case it actually did work. compared to ~500 failed attempts, this seems like not working, although I did not change anything between those API requests.

has anyone ever experienced something similar?

like image 364
mxe Avatar asked Jun 30 '15 17:06

mxe


2 Answers

nevermind. now it works. i didnt change anything overnight. i can only assume there were some disturbances at GCM / APNS..

edit: and it's not working again (10 hrs later). NotRegistered for every iOS registration token.

like image 74
mxe Avatar answered Nov 11 '22 20:11

mxe


I ran into this, happened because xcode decided to use the wrong signing identity or provisioning profile (BuildSettings->CodeSigning->CodeSigningIdentity and ProvisingProfile->Automatic).

IOS uses the signature to match the push notification up to your app and if it's wrong, apple thinks that the app isn't installed or doesn't support push notifications and sends a message back to GCM telling it that the device is 'NotRegistered', which just means the app isn't installed on the device anymore.

like image 27
CodeSmith Avatar answered Nov 11 '22 20:11

CodeSmith