{"action":"closed","issue":{"url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/issues/548","labels_url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/issues/548/labels{/name}","comments_url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/issues/548/comments","events_url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/issues/548/events","html_url":"https://github.com/phonegap/phonegap-plugin-push/issues/548","id":129068242,"number":548,"title":"GCM register on iOS 9.2 failed","user":{"login":"trsdln","id":6911494,"avatar_url":"https://avatars.githubusercontent.com/u/6911494?v=3","gravatar_id":"","url":"https://api.github.com/users/trsdln","html_url":"https://github.com/trsdln","followers_url":"https://api.github.com/users/trsdln/followers","following_url":"https://api.github.com/users/trsdln/following{/other_user}","gists_url":"https://api.github.com/users/trsdln/gists{/gist_id}","starred_url":"https://api.github.com/users/trsdln/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trsdln/subscriptions","organizations_url":"https://api.github.com/users/trsdln/orgs","repos_url":"https://api.github.com/users/trsdln/repos","events_url":"https://api.github.com/users/trsdln/events{/privacy}","received_events_url":"https://api.github.com/users/trsdln/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/labels/ios","name":"ios","color":"BFD4F2"},{"url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-01-27T08:25:30Z","updated_at":"2016-01-28T13:56:52Z","closed_at":"2016-01-28T13:56:52Z","body":"Unable to get GCM device token iOS. While starting app got logs like:\r\n\r\n```\r\n2016-01-26 17:07:17.503 TestApp[636:8b07] Push Plugin register called\r\n2016-01-26 17:07:17.505 TestApp[636:8b07] PushPlugin.register: setting badge to false\r\n2016-01-26 17:07:17.506 TestApp[636:8b07] PushPlugin.register: clear badge is set to 0\r\n2016-01-26 17:07:17.506 TestApp[636:8b07] PushPlugin.register: better button setup\r\n2016-01-26 17:07:17.508 TestApp[636:8b07] GCM Sender ID 24418721324\r\n2016-01-26 17:07:17.508 TestApp[636:8b07] Using GCM Notification\r\n2016-01-26 17:07:17.511 TestApp[636:60b] Push Plugin register success: <274065df 02893f3e dfacd27a aeaacd29 6f368929 33cb09ef 98bc2b9f 031554bb>\r\n2016-01-26 17:07:17.523: GGLInstanceID | Unable to find token in cache Error Domain=com.google.iid Code=-25300 \"The operation couldn’t be completed. (com.google.iid error -25300.)\"\r\n2016-01-26 17:07:17.988 TestApp[636:60b] Registration to GCM failed with error: The operation couldn’t be completed. (com.google.HTTPStatus error 401.)\r\n2016-01-26 17:07:18.059 TestApp[636:60b] push notification error Error:  - The operation couldn’t be completed. (com.google.HTTPStatus error 401.)\r\n```\r\n\r\nThis error was produced by this code:\r\n\r\n```js\r\nvar onDeviceReady = function () {\r\n    var pushNotification = PushNotification.init({\r\n      android: {},\r\n      ios: {\r\n        senderID: google_project_id,\r\n        alert: true,\r\n        badge: true,\r\n        sound: true\r\n      },\r\n      windows: {}\r\n    });\r\n    PushNotification.hasPermission(function (permissionResult) {\r\n      if (permissionResult.isEnabled) {\r\n        pushNotification.on('registration', function (registrationResult) {\r\n          console.log(registrationResult.registrationId);\r\n        });\r\n        pushNotification.on('error', function (error) {\r\n          console.log('push notification error', error);\r\n        });\r\n      }\r\n    });\r\n  };\r\n  document.addEventListener('deviceready', onDeviceReady, false);\r\n```\r\n\r\n"}}