Observable final class Store { private(set) var results: [HKCorrelation] = [] private let store = HKHealthStore Observable final class Store { private(set) var results: [HKCorrelation] = [] private let store = HKHealthStore 你可以用它更灵活地处理任务取消: actor SearchService { private var cachedResults: [HKCorrelation] = [] private let store = HKHealthStore
HKQuantityTypeIdentifierDistanceWalkingRunning]; return [NSSet setWithObjects:stepType,distanceType, nil]; } //需要确定设备支持HealthKit if ([HKHealthStore isHealthDataAvailable]) { return; } HKHealthStore *healthStore = [[HKHealthStore alloc]
HKQuantityTypeIdentifierDistanceWalkingRunning]; return [NSSet setWithObjects:stepType,distanceType, nil]; } //需要确定设备支持HealthKit if ([HKHealthStore isHealthDataAvailable]) { return; } HKHealthStore *healthStore = [[HKHealthStore alloc]
Observable final class Store { private(set) var results: [HKCorrelation] = [] private let store = HKHealthStore
而是应该在权限列表中添加些自定义信息来说明为什么你的应用需要访问特定的数据(参阅HKHealthStore Class Feference可获取更多信息)的原因。