<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "HealthKit",
  "identifier" : "/documentation/HealthKit/HKHealthStore/authorizationStatus(for:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "HealthKit"
    ],
    "preciseIdentifier" : "c:objc(cs)HKHealthStore(im)authorizationStatusForType:"
  },
  "title" : "authorizationStatus(for:)"
}
-->

# authorizationStatus(for:)

Returns the app’s authorization status for sharing the specified data type.

```
func authorizationStatus(for type: HKObjectType) -> HKAuthorizationStatus
```

## Parameters

`type`

The type of data. This can be any concrete subclass of the [`HKObjectType`](/documentation/HealthKit/HKObjectType) class (any of the [`HKCharacteristicType`](/documentation/HealthKit/HKCharacteristicType) , [`HKQuantityType`](/documentation/HealthKit/HKQuantityType), [`HKCategoryType`](/documentation/HealthKit/HKCategoryType), [`HKWorkoutType`](/documentation/HealthKit/HKWorkoutType) or [`HKCorrelationType`](/documentation/HealthKit/HKCorrelationType) classes).

## Return Value

A value indicating the app’s authorization status for this type. For a list of possible values, see [`HKAuthorizationStatus`](/documentation/HealthKit/HKAuthorizationStatus).

## Discussion

This method checks the authorization status for saving data to the HealthKit store.

> Important:
> An app’s permissions don’t change when an app runs in a Guest User session. Therefore, ``doc://com.apple.healthkit/documentation/HealthKit/HKHealthStore/authorizationStatus(for:)`` returns <doc://com.apple.documentation/documentation/Swift/true> if the owner previously granted authorization to write the data, even though the app can’t write it during a Guest User session. For more information, refer to <doc://com.apple.healthkit/documentation/HealthKit/authorizing-access-to-health-data>.

To help prevent possible leaks of sensitive health information, your app cannot determine whether or not a user has granted permission to read data. If you are not given permission, it  simply appears as if there is no data of the requested type in the HealthKit store. If your app is given share permission but not read permission, you see only the data that your app has written to the store. Data from other sources remains hidden.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)