{"action":"created","issue":{"url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/issues/680","repository_url":"https://api.github.com/repos/phonegap/phonegap-plugin-push","labels_url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/issues/680/labels{/name}","comments_url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/issues/680/comments","events_url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/issues/680/events","html_url":"https://github.com/phonegap/phonegap-plugin-push/issues/680","id":139544222,"number":680,"title":"PushNotification.init Fails (only in ios) with phonegap-plugin-push v1.6.0","user":{"login":"sectorf8","id":13019579,"avatar_url":"https://avatars.githubusercontent.com/u/13019579?v=3","gravatar_id":"","url":"https://api.github.com/users/sectorf8","html_url":"https://github.com/sectorf8","followers_url":"https://api.github.com/users/sectorf8/followers","following_url":"https://api.github.com/users/sectorf8/following{/other_user}","gists_url":"https://api.github.com/users/sectorf8/gists{/gist_id}","starred_url":"https://api.github.com/users/sectorf8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sectorf8/subscriptions","organizations_url":"https://api.github.com/users/sectorf8/orgs","repos_url":"https://api.github.com/users/sectorf8/repos","events_url":"https://api.github.com/users/sectorf8/events{/privacy}","received_events_url":"https://api.github.com/users/sectorf8/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-09T10:56:31Z","updated_at":"2016-03-09T12:24:25Z","closed_at":null,"body":"I use v1.6.0 in ionic 1.2\r\nAndroid is working fine, but ios fail in  PushNotification.init();\r\n\r\nWhen i called it shows:\r\n\"ReferenceError: Can't find variable:  PushNotification\"\r\n\r\nMy code:\r\n```\r\n$ionicPlatform.ready(function() { \r\n             try{   \r\n\t\t\tvar push = PushNotification.init({\r\n\t\t\t    android: {\r\n\t\t\t\tsenderID: \"XXXXXX\"\r\n\t\t\t    },\r\n\t\t\t    ios: {\r\n\t\t\t\talert: \"true\",\r\n\t\t\t\tbadge: \"true\",\r\n\t\t\t\tsound: \"true\"\r\n\t\t\t    },\r\n\t\t\t    windows: {}\r\n\t\t\t});\r\n\t\t\tpush.on('registration', function(data) {\r\n\t\t\t    alert('registration AA: ' + data.registrationId);\r\n\t\t\t});\r\n\t\t  }\r\n\t\t  catch(e){\r\n\t\t    alert(\"tc AA:  \" + e);\r\n\t\t  }\r\n}\r\n```\r\nI used \"ionic add ionic-platform-web-client\" and my plugin list is:\r\n\r\n> cordova-plugin-console 1.0.2 \"Console\"\r\n> cordova-plugin-cs-disable-bitcode 1.0.0 \"DisableBitcode\"\r\n> cordova-plugin-device 1.1.1 \"Device\"\r\n> cordova-plugin-splashscreen 3.1.0 \"Splashscreen\"\r\n> cordova-plugin-statusbar 2.1.1 \"StatusBar\"\r\n> cordova-plugin-whitelist 1.2.1 \"Whitelist\"\r\n> ionic-plugin-keyboard 1.0.8 \"Keyboard\"\r\n> phonegap-plugin-push 1.6.0 \"PushPlugin\"\r\n\r\nMy test device is 'itunesstored/1.0 iOS/9.2.1 model/iPhone7,2 hwp/t7000 build/13D15 (6; dt:106)'\r\n\r\nThanks in advance."},"comment":{"url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/issues/comments/194272483","html_url":"https://github.com/phonegap/phonegap-plugin-push/issues/680#issuecomment-194272483","issue_url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/issues/680","id":194272483,"user":{"login":"alexbuijs","id":19471,"avatar_url":"https://avatars.githubusercontent.com/u/19471?v=3","gravatar_id":"","url":"https://api.github.com/users/alexbuijs","html_url":"https://github.com/alexbuijs","followers_url":"https://api.github.com/users/alexbuijs/followers","following_url":"https://api.github.com/users/alexbuijs/following{/other_user}","gists_url":"https://api.github.com/users/alexbuijs/gists{/gist_id}","starred_url":"https://api.github.com/users/alexbuijs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexbuijs/subscriptions","organizations_url":"https://api.github.com/users/alexbuijs/orgs","repos_url":"https://api.github.com/users/alexbuijs/repos","events_url":"https://api.github.com/users/alexbuijs/events{/privacy}","received_events_url":"https://api.github.com/users/alexbuijs/received_events","type":"User","site_admin":false},"created_at":"2016-03-09T12:24:24Z","updated_at":"2016-03-09T12:24:24Z","body":"This is most likely related to #679. I had the same error and finally realised it was caused by the plugin not being installed due to the new required SENDER_ID variable."}}