共用方式為


HKHealthStore.GetRequestStatusForAuthorizationToShare 方法

定義

將要求狀態傳遞至 ,以傳達應用程式是否需要要求使用者許可權。 completion

[Foundation.Export("getRequestStatusForAuthorizationToShareTypes:readTypes:completion:")]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.WatchOS, 5, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 12, 0, ObjCRuntime.PlatformArchitecture.All, null)]
public virtual void GetRequestStatusForAuthorizationToShare (Foundation.NSSet<HealthKit.HKSampleType> typesToShare, Foundation.NSSet<HealthKit.HKObjectType> typesToRead, HealthKit.HKHealthStoreGetRequestStatusForAuthorizationToShareHandler completion);
abstract member GetRequestStatusForAuthorizationToShare : Foundation.NSSet<HealthKit.HKSampleType> * Foundation.NSSet<HealthKit.HKObjectType> * HealthKit.HKHealthStoreGetRequestStatusForAuthorizationToShareHandler -> unit
override this.GetRequestStatusForAuthorizationToShare : Foundation.NSSet<HealthKit.HKSampleType> * Foundation.NSSet<HealthKit.HKObjectType> * HealthKit.HKHealthStoreGetRequestStatusForAuthorizationToShareHandler -> unit

參數

typesToShare
NSSet<HKSampleType>

要要求共用授權狀態的類型。

typesToRead
NSSet<HKObjectType>

要要求讀取授權狀態的類型。

completion
HKHealthStoreGetRequestStatusForAuthorizationToShareHandler

作業完成時要執行的處理常式。

屬性

適用於