{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/issues/117","repository_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push","labels_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/issues/117/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/issues/117/comments","events_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/issues/117/events","html_url":"https://github.com/Microsoft/cordova-plugin-code-push/issues/117","id":153615924,"number":117,"title":"Reporting does not work when specifying deploymentKey programmatically","user":{"login":"Justin-Credible","id":1243565,"avatar_url":"https://avatars.githubusercontent.com/u/1243565?v=3","gravatar_id":"","url":"https://api.github.com/users/Justin-Credible","html_url":"https://github.com/Justin-Credible","followers_url":"https://api.github.com/users/Justin-Credible/followers","following_url":"https://api.github.com/users/Justin-Credible/following{/other_user}","gists_url":"https://api.github.com/users/Justin-Credible/gists{/gist_id}","starred_url":"https://api.github.com/users/Justin-Credible/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Justin-Credible/subscriptions","organizations_url":"https://api.github.com/users/Justin-Credible/orgs","repos_url":"https://api.github.com/users/Justin-Credible/repos","events_url":"https://api.github.com/users/Justin-Credible/events{/privacy}","received_events_url":"https://api.github.com/users/Justin-Credible/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-05-07T20:24:20Z","updated_at":"2016-05-09T16:57:52Z","closed_at":"2016-05-09T16:57:52Z","body":"Steps to reproduce:\r\n1. Ensure deployment key is NOT present in `config.xml`\r\n2. Add a new deployment via the CLI\r\n3. In the app, call `codePush.sync(...)` with a `SyncOptions` object populated with the `deploymentKey`\r\n4. After update check install metrics from the command line using: `code-push history MyApp MyDeployment`\r\n\r\nExpected results: Install metrics should have updated.\r\n\r\nActual results: Install metrics have NOT updated.\r\n\r\nPrior to #108, specifying the deployment key programmatically would cause a crash on iOS. #110 fixed this crash, but the way the fix was implemented will prevent install metrics from being reported. See [here](https://github.com/Microsoft/cordova-plugin-code-push/pull/110/files#diff-7cf184072214004a5cb773da18b0173dR49) and [here](https://github.com/Microsoft/cordova-plugin-code-push/pull/110/files#diff-21c28bc9b0a8cf9a55ca53cb6f66c32bR11) where the reporting code is short circuited with an early return if the deployment key is not in `config.xml`."},"comment":{"url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/issues/comments/217923276","html_url":"https://github.com/Microsoft/cordova-plugin-code-push/issues/117#issuecomment-217923276","issue_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/issues/117","id":217923276,"user":{"login":"Justin-Credible","id":1243565,"avatar_url":"https://avatars.githubusercontent.com/u/1243565?v=3","gravatar_id":"","url":"https://api.github.com/users/Justin-Credible","html_url":"https://github.com/Justin-Credible","followers_url":"https://api.github.com/users/Justin-Credible/followers","following_url":"https://api.github.com/users/Justin-Credible/following{/other_user}","gists_url":"https://api.github.com/users/Justin-Credible/gists{/gist_id}","starred_url":"https://api.github.com/users/Justin-Credible/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Justin-Credible/subscriptions","organizations_url":"https://api.github.com/users/Justin-Credible/orgs","repos_url":"https://api.github.com/users/Justin-Credible/repos","events_url":"https://api.github.com/users/Justin-Credible/events{/privacy}","received_events_url":"https://api.github.com/users/Justin-Credible/received_events","type":"User","site_admin":false},"created_at":"2016-05-09T16:57:52Z","updated_at":"2016-05-09T16:57:52Z","body":"@geof90 After re-testing it looks like the metadata is being reported properly. My mistake! I was hung up on the fact that the method was being short circuited."}}