Post

Replies

Boosts

Views

Activity

Query ECG individual voltage measurement values
I'm trying to get the individual voltage measurements of an ECG back from Apple HealthKit using new APIs in iOS 14. I've already managed to use: let ecgQuery = HKSampleQuery(sampleType: HKObjectType.electrocardiogramType(), predicate: samplePredicate, limit: 0, sortDescriptors: [sortDescriptor]){ (query, results, error) in which gets me a HKElectrocardiogram object. From this I can see the average heart rate, ECG classification etc... I now believe I need to pass that object into an HKElectrocardiogramQuery like this:let ecgSample = HKElectrocardiogramQuery(ecg) { (query, result) in but I can't find any way to extract data from the result data handler. If I put a print in on result, it executes many times but again, I can't extract the data. result is of type HKElectrocardiogramQuery.Result The documentations pretty sketchy on Apple's developer site with zero examples provided. Any help would be very appreciated. Cheers
1
0
1.4k
Aug ’20
How often do I schedule Widget updates?
Classically, the demo in the Meet WidgetKit video used a Calendar as an example, where clearly the times to update are simple to calculate based on when the users events will occur. I'd like to know about the Activity/Fitness Widget. There's no way to tell when a user will burn that next calorie and as far as I can tell, there's still no background observer in HealthKit you can use to call an update on changes. So, with that in mind, how often should I call to update? This same dilemma applies to ClockKit and WatchOS complications.
4
0
2.8k
Jun ’20