Edit

Share via


HKHealthStore.EnableBackgroundDelivery Method

Definition

Enable the background delivery of notifications of the specified type and runs an action after delivery has been disabled.

[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

Parameters

type
HKObjectType

The object type for which to enable background notifications.

frequency
HKUpdateFrequency

The maximum allowed update frequency.

completion
Action<Boolean,NSError>

A handler to run when the operation completes.

Attributes

Applies to