Commit 2c59ecfe authored by Andreas Amsenius's avatar Andreas Amsenius

Add documentation for authorizationStatusForType

parent f1efac60
...@@ -100,6 +100,7 @@ AppleHealthKit.initHealthKit(options: Object, (err: string, results: Object) => ...@@ -100,6 +100,7 @@ AppleHealthKit.initHealthKit(options: Object, (err: string, results: Object) =>
* Base Methods * Base Methods
* [isAvailable](/docs/isAvailable().md) * [isAvailable](/docs/isAvailable().md)
* [initHealthKit](/docs/initHealthKit().md) * [initHealthKit](/docs/initHealthKit().md)
* [authorizationStatusForType](/docs/authorizationStatusForType().md)
* Realtime Methods * Realtime Methods
* [initStepCountObserver](/docs/initStepCountObserver().md) * [initStepCountObserver](/docs/initStepCountObserver().md)
* Read Methods * Read Methods
......
Check the authorization status for sharing (writing) the specified data type.
Status will be one of `"NotDetermined"`, `"SharingDenied"`, `"SharingAuthorized"`.
```javascript
AppleHealthKit.authorizationStatusForType(
"initHealthKit", (error, status) => {
if (status) {
console.log("status is", status)
}
}
)
```
There is no way to check authorization status for read permission, [see this](https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatusfortype?language=objc).
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