{"action":"created","issue":{"url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/issues/279","labels_url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/issues/279/labels{/name}","comments_url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/issues/279/comments","events_url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/issues/279/events","html_url":"https://github.com/phonegap/phonegap-plugin-push/issues/279","id":114075120,"number":279,"title":"Question: iOS not running push.on('notification') code","user":{"login":"inferno1005","id":160181,"avatar_url":"https://avatars.githubusercontent.com/u/160181?v=3","gravatar_id":"","url":"https://api.github.com/users/inferno1005","html_url":"https://github.com/inferno1005","followers_url":"https://api.github.com/users/inferno1005/followers","following_url":"https://api.github.com/users/inferno1005/following{/other_user}","gists_url":"https://api.github.com/users/inferno1005/gists{/gist_id}","starred_url":"https://api.github.com/users/inferno1005/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inferno1005/subscriptions","organizations_url":"https://api.github.com/users/inferno1005/orgs","repos_url":"https://api.github.com/users/inferno1005/repos","events_url":"https://api.github.com/users/inferno1005/events{/privacy}","received_events_url":"https://api.github.com/users/inferno1005/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-10-29T15:28:40Z","updated_at":"2015-10-30T14:38:27Z","closed_at":null,"body":"I am having trouble getting the iOS version of my ionic app to run custom code whenever a push notification comes through. \r\n\r\nI am receiving the push, and it is showing up in the notification shade. \r\nI'm using ionic's push platform (it is in alpha) documented here \r\nhttp://docs.ionic.io/docs/push-sending-push\r\n\r\nThe curl request I am sending is \r\n`curl -u PRIVATE_KEY_HERE: -H \"Content-Type: application/json\" -H \"X-Ionic-Application-Id: APP_ID_HERE\" https://push.ionic.io/api/v1/push -d '{\"tokens\": [\"TOKEN_HERE\"],\"production\": false, \"notification\":{  \"alert\":\"asdf\", \"title\": \"asdfsadf\", \"android\": {\"payload\": {}}, \"ios\": { \"badge\":0,   \"content-available\":\"1\"}}}'\r\n`\r\nI have tried different json with this curl request and it doesn't seem to change the problem. `\r\n\r\nThe same  code is working on android, so I feel like it is some strangeness going on with iOS. \r\nAny ideas would be much appreciated! \r\n"},"comment":{"url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/issues/comments/152543118","html_url":"https://github.com/phonegap/phonegap-plugin-push/issues/279#issuecomment-152543118","issue_url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/issues/279","id":152543118,"user":{"login":"macdonst","id":353180,"avatar_url":"https://avatars.githubusercontent.com/u/353180?v=3","gravatar_id":"","url":"https://api.github.com/users/macdonst","html_url":"https://github.com/macdonst","followers_url":"https://api.github.com/users/macdonst/followers","following_url":"https://api.github.com/users/macdonst/following{/other_user}","gists_url":"https://api.github.com/users/macdonst/gists{/gist_id}","starred_url":"https://api.github.com/users/macdonst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/macdonst/subscriptions","organizations_url":"https://api.github.com/users/macdonst/orgs","repos_url":"https://api.github.com/users/macdonst/repos","events_url":"https://api.github.com/users/macdonst/events{/privacy}","received_events_url":"https://api.github.com/users/macdonst/received_events","type":"User","site_admin":false},"created_at":"2015-10-30T14:38:27Z","updated_at":"2015-10-30T14:38:27Z","body":"@peterschmidler then it seems to problem wouldn't be with the plugin but the way in which you are sending the notification."}}