Commit 18254291 authored by Greg Wilson's avatar Greg Wilson

update readme

parent a36f2331
...@@ -144,6 +144,32 @@ The available HealthKit permissions to use with `initHealthKit` ...@@ -144,6 +144,32 @@ The available HealthKit permissions to use with `initHealthKit`
| AppleExerciseTime | [HKQuantityTypeIdentifierAppleExerciseTime](https://developer.apple.com/reference/healthkit/hkquantitytypeidentifierappleexercisetime?language=objc) | ✓ | | | AppleExerciseTime | [HKQuantityTypeIdentifierAppleExerciseTime](https://developer.apple.com/reference/healthkit/hkquantitytypeidentifierappleexercisetime?language=objc) | ✓ | |
| DietaryEnergy | [HKQuantityTypeIdentifierDietaryEnergyConsumed](https://developer.apple.com/reference/healthkit/hkquantitytypeidentifierdietaryenergyconsumed?language=objc) | ✓ | ✓ | | DietaryEnergy | [HKQuantityTypeIdentifierDietaryEnergyConsumed](https://developer.apple.com/reference/healthkit/hkquantitytypeidentifierdietaryenergyconsumed?language=objc) | ✓ | ✓ |
These permissions are exported as constants of the `react-native-apple-healthkit` module.
```javascript
import AppleHealthKit from 'react-native-apple-healthkit';
...
// get the available permissions from AppleHealthKit.Constants object
const PERMS = AppleHealthKit.Constants.Permissions;
// setup healthkit read/write permissions from PERMS
const healthKitOptions = {
permissions: {
read: [
PERMS.StepCount,
PERMS.Height,
],
write: [
PERMS.StepCount
],
}
};
...
```
Options Options
------- -------
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment