編輯

共用方式為


HKHealthStore.HandleAuthorizationForExtension Method

Definition

Requests authorization for an extension to read and write data, and runs a completion handler that receives a Boolean success value and an error object.

[Foundation.Export("handleAuthorizationForExtensionWithCompletion:")]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 9, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.WatchOS, ObjCRuntime.PlatformArchitecture.All, null)]
public virtual void HandleAuthorizationForExtension (Action<bool,Foundation.NSError> completion);
abstract member HandleAuthorizationForExtension : Action<bool, Foundation.NSError> -> unit
override this.HandleAuthorizationForExtension : Action<bool, Foundation.NSError> -> unit

Parameters

completion
Action<Boolean,NSError>

A handler to run when the operation completes.

Attributes

Applies to