Example project of HealthKit - read data.
Example project of HealthKit
A Series of HealthKit Demo.
pod install
This project use promise pattern.
DataStoreManager
is wrapper of HKHealthStore.
DataStoreManager use PromiseKit.
@interface DataStoreManager : NSObject
@property(nonatomic, strong) HKHealthStore *healthStore;
// authorizationToType + authorizationStatusForType
- (PMKPromise *)availableType:(HKQuantityType *) hkQuantity;
- (PMKPromise *)authorizationToType:(HKQuantityType *) hkQuantity;
- (PMKPromise *)authorizationStatusForType:(HKQuantityType *) quantityType;
- (PMKPromise *)writeSample:(HKQuantitySample *)sample;
- (PMKPromise *)fetchAllSampleForType:(HKQuantityType *) quantityType;
@end
git checkout -b my-new-feature
git commit -am 'Add some feature'
git push origin my-new-feature
MIT