{"action":"created","issue":{"url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/issues/645","repository_url":"https://api.github.com/repos/phonegap/phonegap-plugin-push","labels_url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/issues/645/labels{/name}","comments_url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/issues/645/comments","events_url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/issues/645/events","html_url":"https://github.com/phonegap/phonegap-plugin-push/pull/645","id":135958414,"number":645,"title":"Add coldstart property for iOS","user":{"login":"kenvunz","id":274309,"avatar_url":"https://avatars.githubusercontent.com/u/274309?v=3","gravatar_id":"","url":"https://api.github.com/users/kenvunz","html_url":"https://github.com/kenvunz","followers_url":"https://api.github.com/users/kenvunz/followers","following_url":"https://api.github.com/users/kenvunz/following{/other_user}","gists_url":"https://api.github.com/users/kenvunz/gists{/gist_id}","starred_url":"https://api.github.com/users/kenvunz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kenvunz/subscriptions","organizations_url":"https://api.github.com/users/kenvunz/orgs","repos_url":"https://api.github.com/users/kenvunz/repos","events_url":"https://api.github.com/users/kenvunz/events{/privacy}","received_events_url":"https://api.github.com/users/kenvunz/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-24T05:18:53Z","updated_at":"2016-03-01T16:06:41Z","closed_at":"2016-03-01T16:06:41Z","pull_request":{"url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/pulls/645","html_url":"https://github.com/phonegap/phonegap-plugin-push/pull/645","diff_url":"https://github.com/phonegap/phonegap-plugin-push/pull/645.diff","patch_url":"https://github.com/phonegap/phonegap-plugin-push/pull/645.patch"},"body":"Trying to mimic the same `coldstart` behaviour of the android version.\r\n\r\nLike in the android version, `coldstart` has 3 different states instead of just `true | false`\r\n\r\n- `undefined` (`coldstart` property doesn't exist in the `addtionalData` object) - `on('notification')` is triggered when the app is in either **background** or **foreground** mode\r\n\r\n- `true` - `on('notification')` is triggered when the app is launched from a notification, and the app is in **suspended** mode\r\n\r\n- `false` - `on('notification')` is triggered when the app is launched from a notification, and the app is in **background** mode\r\n\r\nI've tested it fairly thoroughly with iOS 9.2 and it seems to be working fine. I'm not an Objective-C expert so I might have miss something, feel free to point them out and I'll try to fix them.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/issues/comments/190786236","html_url":"https://github.com/phonegap/phonegap-plugin-push/pull/645#issuecomment-190786236","issue_url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/issues/645","id":190786236,"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":"2016-03-01T16:06:41Z","updated_at":"2016-03-01T16:06:41Z","body":"@kenvunz thanks for the PR but I already implemented coldstart in the v1.6.x branch. Please take a look over commit https://github.com/phonegap/phonegap-plugin-push/commit/ef8759f2a3c3c8117aab9ca71086b389ed2dde4d and let give me some comments."}}