HKObserverQuery以哪种格式获取数据?没有NSArray或NSDictionary来存储数据,然后如何获取数据。我把查询放不上所有数据,有谁能帮忙吗?
HKObserverQuery *query =
[[HKObserverQuery alloc]
initWithSampleType:object
predicate:Predicate
updateHandler:^(HKObserverQuery *query,
HKObserverQueryCompletionHandler completionHandler,
NSError *error) {
[HKUnit unitFromString:@"count/min"]];
if (error) {
// Perform Proper Error Handling Here...
NSLog(@"*** An error occured while setting up the stepCount observer. %@ ***",
error.localizedDescription);
abort();
}
else{
NSLog(@"@%",query);
}
}];发布于 2016-03-30 02:33:10
HKObserverQuery并不打算向您的应用程序提供数据。每当添加或从updateHandler中删除与谓词匹配的HKSample时,都会简单地调用HealthKit。然后由您的应用程序执行其他响应查询,例如HKSampleQuery或HKStatisticsQuery。
https://stackoverflow.com/questions/36276089
复制相似问题