Skip to content

Commit

Permalink
update docs according actual implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
EJohnF authored Apr 29, 2019
1 parent b4f58a1 commit ca1c0bb
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions docs/authorizationStatusForType().md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

0 comments on commit ca1c0bb

Please sign in to comment.