HKHealthStore.EnableBackgroundDelivery 方法

定义

启用指定类型的通知的后台传递,并在禁用传递后运行操作。

[Foundation.Export("enableBackgroundDeliveryForType:frequency:withCompletion:")]
[ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.WatchOS, ObjCRuntime.PlatformArchitecture.All, null)]
public virtual void EnableBackgroundDelivery (HealthKit.HKObjectType type, HealthKit.HKUpdateFrequency frequency, Action<bool,Foundation.NSError> completion);
abstract member EnableBackgroundDelivery : HealthKit.HKObjectType * HealthKit.HKUpdateFrequency * Action<bool, Foundation.NSError> -> unit
override this.EnableBackgroundDelivery : HealthKit.HKObjectType * HealthKit.HKUpdateFrequency * Action<bool, Foundation.NSError> -> unit

参数

type
HKObjectType

要为其启用后台通知的对象类型。

frequency
HKUpdateFrequency

允许的最大更新频率。

completion
Action<Boolean,NSError>

操作完成时要运行的处理程序。

属性

适用于