Commit ca1c0bb0 authored by Evstropov Evgenii's avatar Evstropov Evgenii Committed by GitHub

update docs according actual implementation

parent b4f58a1a
......@@ -3,13 +3,14 @@ Check the authorization status for sharing (writing) the specified data type.
Status will be one of `"NotDetermined"`, `"SharingDenied"`, `"SharingAuthorized"`.
```javascript
AppleHealthKit.authorizationStatusForType(
"StepCount", (error, status) => {
if (status) {
console.log("status is", status)
}
}
)
try {
const status = await AppleHealthKit.authorizationStatusForType("StepCount")
if (status) {
console.log("status is", status)
}
} catch (error) {
console.warn(error)
}
```
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