Skip to content

Commit

Permalink
Support asking for DateOfBirth permission (#134)
Browse files Browse the repository at this point in the history
  • Loading branch information
jacquerie authored and terrillo committed Jan 21, 2020
1 parent daaffab commit be222fa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion RCTAppleHealthKit/RCTAppleHealthKit+TypesAndPermissions.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ - (nullable HKObjectType *)getReadPermFromText:(nonnull NSString*)key {
float systemVersion = deviceInfo.systemVersion.floatValue;

// Characteristic Identifiers
if ([@"Height" isEqualToString: key]) {
if ([@"DateOfBirth" isEqualToString: key]) {
return [HKObjectType characteristicTypeForIdentifier:HKCharacteristicTypeIdentifierDateOfBirth];
}else if ([@"Height" isEqualToString: key]) {
return [HKObjectType quantityTypeForIdentifier:HKQuantityTypeIdentifierHeight];
}else if ([@"Weight" isEqualToString: key]) {
return [HKObjectType quantityTypeForIdentifier:HKQuantityTypeIdentifierBodyMass];
Expand Down

0 comments on commit be222fa

Please sign in to comment.