Healthkit example that demonstrates how to authorize, read from and write to HealthKit.
On success you can reload your parent view controller and reload any data that you will be reading from.
- (void)authorize:(void (^)(BOOL success))completion;
Date of birth (MM-dd-yyyy format)
- (NSString*)birthday;
Retrieve stored height, weight
- (void)height:(void (^)(double height))completion;
- (void)weight:(void (^)(double weight))completion;
Steps since midnight
- (void)steps:(void (^)(double steps))completion;
Calories (resting, active, dietary)
- (void)energy:(void (^)(NSString * energy))completion;
Record steps (incremental), height, weight
- (void)recordSteps:(double)increment completion:(void (^)(BOOL recorded, NSError * error))completion;
- (void)recordHeight:(double)height completion:(void (^)(BOOL recorded, NSError * error))completion;
- (void)recordWeight:(double)weight completion:(void (^)(BOOL recorded, NSError * error))completion;