diff --git a/RCTAppleHealthKit/RCTAppleHealthKit.m b/RCTAppleHealthKit/RCTAppleHealthKit.m index 5ef4eccc..c91c4713 100644 --- a/RCTAppleHealthKit/RCTAppleHealthKit.m +++ b/RCTAppleHealthKit/RCTAppleHealthKit.m @@ -39,11 +39,6 @@ @implementation RCTAppleHealthKit [self initializeHealthKit:input callback:callback]; } -RCT_EXPORT_METHOD(checkSharePermission:(NSString *)input callback:(RCTResponseSenderBlock)callback) -{ - [self checkPermission:input callback:callback]; -} - RCT_EXPORT_METHOD(initStepCountObserver:(NSDictionary *)input callback:(RCTResponseSenderBlock)callback) { [self fitness_initializeStepEventObserver:input callback:callback]; @@ -286,23 +281,6 @@ - (void)initializeHealthKit:(NSDictionary *)input callback:(RCTResponseSenderBlo } } -- (void)checkPermission:(NSString *)input callback:(RCTResponseSenderBlock)callback -{ - self.healthStore = [[HKHealthStore alloc] init]; - if ([HKHealthStore isHealthDataAvailable]) { - - HKObjectType *val = [[self writePermsDict] objectForKey:input]; - - if ([self.healthStore authorizationStatusForType:val] == HKAuthorizationStatusSharingAuthorized) { - callback(@[[NSNull null], @true]); - } else { - callback(@[[NSNull null], @false]); - } - } else { - callback(@[RCTMakeError(@"HealthKit data is not available", nil, nil)]); - } -} - - (void)getModuleInfo:(NSDictionary *)input callback:(RCTResponseSenderBlock)callback { NSDictionary *info = @{ diff --git a/README.md b/README.md index 409d745e..170a40c4 100644 --- a/README.md +++ b/README.md @@ -100,7 +100,6 @@ AppleHealthKit.initHealthKit(options: Object, (err: string, results: Object) => * Base Methods * [isAvailable](/docs/isAvailable().md) * [initHealthKit](/docs/initHealthKit().md) - * checkSharePermission * Realtime Methods * [initStepCountObserver](/docs/initStepCountObserver().md) * [setObserver](/docs/setObserver().md)