SKLocationConfiguration

Objective-C

@interface SKLocationConfiguration : SKConfiguration <NSCopying>

Swift

class SKLocationConfiguration : SKConfiguration, NSCopying

An instance of SKLocationConfiguration can be used to configure the Location sensor.

  • Accuracy of the Location sensor, expressed as an SKLocationAccuracy enumerator.

    Declaration

    Objective-C

    @property (nonatomic) SKLocationAccuracy locationAccuracy;

    Swift

    var locationAccuracy: SKLocationAccuracy { get set }
  • Authrorization of the Location sensor, expressed as an SKLocationAuthorization enumerator. Value can either be When In Use (indicating that sensor will only be active while the app runs in the foreground) or Always (allowing the sensor to be active even when the app runs in the background).

    Declaration

    Objective-C

    @property (nonatomic) SKLocationAuthorization locationAuthorization;

    Swift

    var locationAuthorization: SKLocationAuthorization { get set }
  • The minimum distance in meters that the device needs to move horizontally before the SKSensorDataHandler attached with an SKLocationData object is being called.

    Declaration

    Objective-C

    @property (nonatomic) double distanceFilter;

    Swift

    var distanceFilter: Double { get set }