Edit

Share via


HKHealthStore.EnableBackgroundDeliveryAsync Method

Definition

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

[ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.WatchOS, ObjCRuntime.PlatformArchitecture.All, null)]
public virtual System.Threading.Tasks.Task<Tuple<bool,Foundation.NSError>> EnableBackgroundDeliveryAsync (HealthKit.HKObjectType type, HealthKit.HKUpdateFrequency frequency);
abstract member EnableBackgroundDeliveryAsync : HealthKit.HKObjectType * HealthKit.HKUpdateFrequency -> System.Threading.Tasks.Task<bool * Foundation.NSError>
override this.EnableBackgroundDeliveryAsync : HealthKit.HKObjectType * HealthKit.HKUpdateFrequency -> System.Threading.Tasks.Task<bool * Foundation.NSError>

Parameters

type
HKObjectType

The object type for which to enable background notifications.

frequency
HKUpdateFrequency

The maximum allowed update frequency.

Returns

A task that represents the asynchronous EnableBackgroundDelivery operation. The value of the TResult parameter is of type System.Action<System.Boolean,Foundation.NSError>.

Attributes

Applies to