Editar

Compartir a través de


UIApplication.SetMinimumBackgroundFetchInterval(Double) Method

Definition

Activates backgound fetching.

[Foundation.Export("setMinimumBackgroundFetchInterval:")]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.TvOS, 11, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 7, 0, ObjCRuntime.PlatformArchitecture.All, null)]
public virtual void SetMinimumBackgroundFetchInterval (double minimumBackgroundFetchInterval);
abstract member SetMinimumBackgroundFetchInterval : double -> unit
override this.SetMinimumBackgroundFetchInterval : double -> unit

Parameters

minimumBackgroundFetchInterval
Double

The desired minimum background fetch interval. This constant BackgroundFetchIntervalMinimum can be used to set the minimum update interval or BackgroundFetchIntervalNever) to disable background fetching.

Attributes

Remarks

This method can be used to enable or disable background fetching. When this is enabled, the operating system will call the application's delegate PerformFetch(UIApplication, Action<UIBackgroundFetchResult>) method at the discretion of the operating system to allow the application to download and request data from a server.

This requires that the application has the background fetch entitlement activated.

Applies to