diff --git a/docs/authorizationStatusForType().md b/docs/authorizationStatusForType().md index 556aff0b70cbc6dfa8c4ecc83338b2ab79c95093..8687b89b926df11f8348d2f46bbd5d2587454d30 100644 --- a/docs/authorizationStatusForType().md +++ b/docs/authorizationStatusForType().md @@ -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).