Contents

getRequestStatusForAuthorization(toShare:read:completion:)

Indicates whether the system presents the user with a permission sheet if your app requests authorization for the provided types.

Declaration

func getRequestStatusForAuthorization(toShare typesToShare: Set<HKSampleType>, read typesToRead: Set<HKObjectType>, completion: @escaping  @Sendable (HKAuthorizationRequestStatus, (any Error)?) -> Void)
func statusForAuthorizationRequest(toShare typesToShare: Set<HKSampleType>, read typesToRead: Set<HKObjectType>) async throws -> HKAuthorizationRequestStatus

Discussion

When working with clinical types, users may need to reauthorize access when new data is added.

See Also

Accessing HealthKit