{"action":"created","issue":{"url":"https://api.github.com/repos/Telerik-Verified-Plugins/HealthKit/issues/11","labels_url":"https://api.github.com/repos/Telerik-Verified-Plugins/HealthKit/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/Telerik-Verified-Plugins/HealthKit/issues/11/comments","events_url":"https://api.github.com/repos/Telerik-Verified-Plugins/HealthKit/issues/11/events","html_url":"https://github.com/Telerik-Verified-Plugins/HealthKit/issues/11","id":55858027,"number":11,"title":"querySampleType requiring write permissions","user":{"login":"FaridW","id":790442,"avatar_url":"https://avatars.githubusercontent.com/u/790442?v=3","gravatar_id":"","url":"https://api.github.com/users/FaridW","html_url":"https://github.com/FaridW","followers_url":"https://api.github.com/users/FaridW/followers","following_url":"https://api.github.com/users/FaridW/following{/other_user}","gists_url":"https://api.github.com/users/FaridW/gists{/gist_id}","starred_url":"https://api.github.com/users/FaridW/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FaridW/subscriptions","organizations_url":"https://api.github.com/users/FaridW/orgs","repos_url":"https://api.github.com/users/FaridW/repos","events_url":"https://api.github.com/users/FaridW/events{/privacy}","received_events_url":"https://api.github.com/users/FaridW/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-01-29T05:25:52Z","updated_at":"2015-09-15T05:43:20Z","closed_at":"2015-01-29T23:16:27Z","body":"Here is my prompt for permission code\r\n\r\n`\r\nwindow.plugins.healthkit.requestAuthorization({ 'readTypes'  : ['HKQuantityTypeIdentifierStepCount','HKQuantityTypeIdentifierActiveEnergyBurned'\r\n]}, auth_callback, auth_callback);\r\n`\r\n\r\nAnd my query code:\r\n\r\n`window.plugins.healthkit.querySampleType({'startDate': start, 'endDate': finish, 'sampleType': 'HKQuantityTypeIdentifierStepCount'}`\r\n\r\nThe authorisation dialogue appears with 2 toggles as expected initially, however the query code forces the authorisation dialogue again, with the 2 toggles maintaining their \"on\" stage, but also displays a prompt for write permission for the Identifier being requested (HKQuantityTypeIdentifierStepCount). I do not need write permission and do not explicitly request it in my code. The code I've shown is all the code my application contains that relates to this plugin.\r\n\r\nAm I missing something obvious or is this unexpected behaviour?"},"comment":{"url":"https://api.github.com/repos/Telerik-Verified-Plugins/HealthKit/issues/comments/140287585","html_url":"https://github.com/Telerik-Verified-Plugins/HealthKit/issues/11#issuecomment-140287585","issue_url":"https://api.github.com/repos/Telerik-Verified-Plugins/HealthKit/issues/11","id":140287585,"user":{"login":"pgmvyc","id":14288100,"avatar_url":"https://avatars.githubusercontent.com/u/14288100?v=3","gravatar_id":"","url":"https://api.github.com/users/pgmvyc","html_url":"https://github.com/pgmvyc","followers_url":"https://api.github.com/users/pgmvyc/followers","following_url":"https://api.github.com/users/pgmvyc/following{/other_user}","gists_url":"https://api.github.com/users/pgmvyc/gists{/gist_id}","starred_url":"https://api.github.com/users/pgmvyc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pgmvyc/subscriptions","organizations_url":"https://api.github.com/users/pgmvyc/orgs","repos_url":"https://api.github.com/users/pgmvyc/repos","events_url":"https://api.github.com/users/pgmvyc/events{/privacy}","received_events_url":"https://api.github.com/users/pgmvyc/received_events","type":"User","site_admin":false},"created_at":"2015-09-15T05:43:20Z","updated_at":"2015-09-15T05:43:20Z","body":"Eddy, I am new to healthkit plugin. Trying to req the authorization like\r\n\r\n  window.plugins.healthkit.requestAuthorization({\r\n    \"readTypes\": [\"HKCorrelationTypeIdentifierBloodPressure\"], \"writeTypes\": []\r\n  },\r\n  function (value) {\r\n    _trace(\"Access to HKCorrelationTypeIdentifierBloodPressure allowed\", true);\r\n  },\r\n  function (value) {\r\n    _trace(\"Access to HKCorrelationTypeIdentifierBloodPressure rejected\", true);\r\n  });\r\n\r\nin the phonegap application.\r\nThe app does NOT display any dialogue but instead crashes 5-6 seconds later.\r\niOS8, the healthkit is available, 'healthkit' permission is on for the app in the Apple's settings.\r\n\r\nAny hint on what I might be doing wrong ?\r\n\r\nThank you."}}