Check the authorization status for sharing (writing) the specified data type.
Status will be one of "NotDetermined"
, "SharingDenied"
, "SharingAuthorized"
.
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.