Skip to content

Commit

Permalink
add workout read permission
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxTheBrogrammer committed Nov 3, 2020
1 parent ef0d21c commit 2f65463
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions RCTAppleHealthKit/RCTAppleHealthKit+TypesAndPermissions.m
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ - (nullable HKObjectType *)getReadPermFromText:(nonnull NSString*)key {
return [HKObjectType quantityTypeForIdentifier:HKQuantityTypeIdentifierNikeFuel];
}

// if ([@"AppleExerciseTime" isEqualToString: key]) {
// return [HKObjectType quantityTypeForIdentifier:HKQuantityTypeIdentifierAppleExerciseTime];
// }
if ([@"AppleExerciseTime" isEqualToString: key]) {
return [HKObjectType quantityTypeForIdentifier:HKQuantityTypeIdentifierAppleExerciseTime];
}

// Nutrition Identifiers
if ([@"DietaryEnergy" isEqualToString: key]) {
Expand Down Expand Up @@ -95,6 +95,8 @@ - (nullable HKObjectType *)getReadPermFromText:(nonnull NSString*)key {
return [HKObjectType categoryTypeForIdentifier:HKCategoryTypeIdentifierMindfulSession];
} else if ([@"MindfulSession" isEqualToString: key]){
return [HKObjectType workoutType];
}else if ([@"Workout" isEqualToString: key]) {
return [HKObjectType workoutType];
}

return nil;
Expand Down

0 comments on commit 2f65463

Please sign in to comment.