9#import <Foundation/Foundation.h>
10#import <HealthKit/HealthKit.h>
11#import "BEPedometer.h"
13#define BEHK_ERROR_UNKNOWN_DATATYPE 2001
14#define BEHK_ERROR_HK_UNAVAILABLE 1001
15#define BEHK_ERROR_NO_DEFAULT_UNIT 1003
16#define BEHK_ERROR_TYPE_NOT_FOUND 1404
17#define BEHK_ERROR_FEATURE_UNAVAILABLE 1005
35- (int)authorizationStatusForType:(NSString *)dataTypeString;
43- (void)authorizeHealthKitToRead:(NSArray *)readIdentifiers write:(NSArray *)writeIdentifiers completion:(
void (^)(
bool success, NSError *error))completion;
50- (void)errorOccurred:(NSError *)error;
58- (HKUnit *)defaultUnitForSampleType:(HKSampleType *)sampleType;
65- (void)addLongRunningQuery:(HKQuery *)query forType:(HKSampleType *)sampleType;
73void _Authorize(
char *dataTypesString);
74int _AuthorizationStatusForType(
char *dataTypeString);
75BOOL _IsHealthDataAvailable();
78NSArray *parseTransmission(
char *dataTypesString);
Handles HealthKit requests from Unity.
Definition BEHealthKit.h:22
HKHealthStore * healthStore
The HKHealthStore object.
Definition BEHealthKit.h:23
NSDictionary * longRunningQueries
keeps track of long-running queries
Definition BEHealthKit.h:26
BEPedometer * pedometer
The BEPedometer object.
Definition BEHealthKit.h:25
instancetype sharedHealthKit()
returns the shared BEHealthKit object
Definition BEHealthKit.m:43
NSString * controllerName
name of the GameObject to send messages to
Definition BEHealthKit.h:24
Handles Pedometer requests from Unity.
Definition BEPedometer.h:14