I want to access my healthKit data in a locally stored .html file (loaded in UIWebView).
My goal is to plot the heart rate, body temperature, calories etc with D3.js in the html file.
(My D3.js plots are already created and works fine in webView accessing hardcoded data from locally stored .csv file)
I have been granted permissions from the HealthStore and know how to query for the data using swift.
Below is a query output (array) from the console in in Xcode, showing my heart rate on different days.
How can I access this HealthKit data in a local html file, in a format readable for D3?
Console Output:
[0.916667 count/s "Health" metadata: { HKWasUserEntered = 1; } 2014-11-30 13:02:00 +0100 2014-11-30 13:02:00 +0100, 1.03333 count/s "Health" metadata: { HKWasUserEntered = 1; } 2014-11-28 13:03:00 +0100 2014-11-28 13:03:00 +0100, 0.95 count/s "Health" metadata: { HKWasUserEntered = 1; } 2014-11-26 13:03:00 +0100 2014-11-26 13:03:00 +0100]