Instance Method

getRequestStatusForAuthorizationToShareTypes:readTypes:completion:

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

Declaration

- (void)getRequestStatusForAuthorizationToShareTypes:(NSSet<HKSampleType *> *)typesToShare readTypes:(NSSet<HKObjectType *> *)typesToRead completion:(void (^)(HKAuthorizationRequestStatus requestStatus, NSError *error))completion;

Discussion

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

See Also

Accessing HealthKit

- authorizationStatusForType:

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

HKAuthorizationStatus

Constants indicating the authorization status for a particular data type.

HKAuthorizationRequestStatus

Values that indicate whether your app needs to request authorization from the user.

+ isHealthDataAvailable

Returns a Boolean value that indicates whether HealthKit is available on this device.

- supportsHealthRecords

Returns a Boolean value that indicates whether the current device supports clinical records.

- requestAuthorizationToShareTypes:readTypes:completion:

Requests permission to save and read the specified data types.

- handleAuthorizationForExtensionWithCompletion:

Requests permission to save and read the data types specified by an extension.