Edit

Share via


CLLocationManager.AllowDeferredLocationUpdatesUntil(Double, Double) Method

Definition

Suggests that location updates are deferred until either distance has been traveled or timeout has passed.

[Foundation.Export("allowDeferredLocationUpdatesUntilTraveled:timeout:")]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 6, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.WatchOS, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.TvOS, ObjCRuntime.PlatformArchitecture.All, null)]
public virtual void AllowDeferredLocationUpdatesUntil (double distance, double timeout);
abstract member AllowDeferredLocationUpdatesUntil : double * double -> unit
override this.AllowDeferredLocationUpdatesUntil : double * double -> unit

Parameters

distance
Double

A distance, in meters, after which location updates should be delivered.

timeout
Double

A time, in seconds, after which location updates should be delivered.

Attributes

Remarks

Application developers must implement CLLocationManagerDelegate and assign the Delegate property prior to calling this method, or they will receive a runtime exception.

Application developers who require GPS-accurate location information when their application is in the background, but do not need that information in near-real-time should use this method to defer delivery. Deferred delivery consumes significantly less power.

This method is only a request. Location updates may occur even if the application is in deferred mode. If updates occur when the application is in deferred mode, the application will stay in deferred mode.

If the application is in the foreground, location updates are not delayed.

This method requires GPS hardware to be available, DistanceFilter to be P:CoreLocation.CLLocationDistance.None, and DesiredAccuracy be either AccuracyBest or AccurracyBestForNavigation.

Applies to