{"action":"created","issue":{"url":"https://api.github.com/repos/Telerik-Verified-Plugins/HealthKit/issues/48","repository_url":"https://api.github.com/repos/Telerik-Verified-Plugins/HealthKit","labels_url":"https://api.github.com/repos/Telerik-Verified-Plugins/HealthKit/issues/48/labels{/name}","comments_url":"https://api.github.com/repos/Telerik-Verified-Plugins/HealthKit/issues/48/comments","events_url":"https://api.github.com/repos/Telerik-Verified-Plugins/HealthKit/issues/48/events","html_url":"https://github.com/Telerik-Verified-Plugins/HealthKit/issues/48","id":102873577,"number":48,"title":"Exception with Withings blood pressure data","user":{"login":"H0rst","id":811574,"avatar_url":"https://avatars.githubusercontent.com/u/811574?v=3","gravatar_id":"","url":"https://api.github.com/users/H0rst","html_url":"https://github.com/H0rst","followers_url":"https://api.github.com/users/H0rst/followers","following_url":"https://api.github.com/users/H0rst/following{/other_user}","gists_url":"https://api.github.com/users/H0rst/gists{/gist_id}","starred_url":"https://api.github.com/users/H0rst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/H0rst/subscriptions","organizations_url":"https://api.github.com/users/H0rst/orgs","repos_url":"https://api.github.com/users/H0rst/repos","events_url":"https://api.github.com/users/H0rst/events{/privacy}","received_events_url":"https://api.github.com/users/H0rst/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-08-24T19:33:56Z","updated_at":"2016-02-04T19:00:43Z","closed_at":"2016-02-04T16:58:17Z","body":"Hello, \r\n\r\nit sounds weird, but i have a strange issue. I use\r\n```\r\n    window.plugins.healthkit.queryCorrelationType(\r\n        {\r\n\t\t\t'startDate' : new Date(0), \r\n\t\t\t'endDate'   : new Date(), \r\n\t\t\t'correlationType': 'HKCorrelationTypeIdentifierBloodPressure', \r\n\t\t\t'unit': 'mmHg'\r\n        },\r\n\t\tfunction (value) {\r\n\t\talert('alive')\r\n\t\t...\r\n```\r\nThis is working. When i add manual values or with the plugin, i can read them. But when i use a Withings blood pressure monitor with the withings app and a single value is added, then i get this exception:\r\n\r\n```\r\n2015-08-24 15:00:56.367 BloodPressureTest[225:14006] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Invalid type in JSON write (__NSTaggedDate)'\r\n*** First throw call stack:\r\n(0x1861d822c 0x1976240e4 0x1861d816c 0x18714c20c 0x18714e1bc 0x18612c444 0x18611998c 0x18714ddb0 0x18714c0d4 0x18714e1bc 0x18612c444 0x18611998c 0x18714ddb0 0x18714c0d4 0x18714e0a4 0x1860ccd48 0x1860ccc2c 0x18714dfa4 0x18714c178 0x18714e1bc 0x1860c19e0 0x1860c18c0 0x18714ddb0 0x18714c0d4 0x18714e0a4 0x1860ccd48 0x1860ccc2c 0x18714dfa4 0x18714c178 0x18714e0a4 0x1860d3b94 0x1860ca4f4 0x18714dfa4 0x18714c178 0x18714bf00 0x18714cfe8 0x10006f5e4 0x10005c1b8 0x100070730 0x10004d22c 0x100258f94 0x100267a60 0x100258f94 0x10025dc28 0x18618f544 0x18618d5ec 0x1860b8f74 0x18f9bb6fc 0x18acbad94 0x100004ba8 0x197ccea08)\r\nlibc++abi.dylib: terminating with uncaught exception of type NSException\r\n```\r\nThe alert is not shown. I have tried to play with the dates, but i get always the same result.\r\n\r\nAny idea what to do?"},"comment":{"url":"https://api.github.com/repos/Telerik-Verified-Plugins/HealthKit/issues/comments/180002767","html_url":"https://github.com/Telerik-Verified-Plugins/HealthKit/issues/48#issuecomment-180002767","issue_url":"https://api.github.com/repos/Telerik-Verified-Plugins/HealthKit/issues/48","id":180002767,"user":{"login":"EddyVerbruggen","id":1426370,"avatar_url":"https://avatars.githubusercontent.com/u/1426370?v=3","gravatar_id":"","url":"https://api.github.com/users/EddyVerbruggen","html_url":"https://github.com/EddyVerbruggen","followers_url":"https://api.github.com/users/EddyVerbruggen/followers","following_url":"https://api.github.com/users/EddyVerbruggen/following{/other_user}","gists_url":"https://api.github.com/users/EddyVerbruggen/gists{/gist_id}","starred_url":"https://api.github.com/users/EddyVerbruggen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EddyVerbruggen/subscriptions","organizations_url":"https://api.github.com/users/EddyVerbruggen/orgs","repos_url":"https://api.github.com/users/EddyVerbruggen/repos","events_url":"https://api.github.com/users/EddyVerbruggen/events{/privacy}","received_events_url":"https://api.github.com/users/EddyVerbruggen/received_events","type":"User","site_admin":false},"created_at":"2016-02-04T19:00:43Z","updated_at":"2016-02-04T19:00:43Z","body":"@sgilroy Looks legit. Are you willing to do a little Pull Request for that change?"}}