QPSettings

public class QPSettings : Glossy
  • Declaration

    Swift

    public var buildNumber: Int
  • Controls if vsign messages are read by the TTS service

    Declaration

    Swift

    public var enableTextToSpeech: Bool
  • Base API url

    Declaration

    Swift

    public var apiBaseUrl: String
  • Default API domain

    Declaration

    Swift

    public var apiDomain: QPApiDomain
  • Controls how often (in seconds) we poll the API for new vSigns Note that apart from polling, vsigns are fetched when the coverage geofence is exited.

    Declaration

    Swift

    public var apiPollInterval: Int
  • Value (in meters) passed to the API as the vsign coverage radius. A value of 1000 would ask the API to give us all vsigns in the given radius.

    Declaration

    Swift

    public var apiCoverageRadius: Int
  • Value in degrees controlling the tolerance for the angle used to detect the entering direction for a vsign

    Declaration

    Swift

    public var bearingToleranceDegrees: Int
  • Controls if the entering angle should be used when detecting if a visgin is being entered

    Declaration

    Swift

    public var enableBearingChecks: Bool
  • GPS updates older than this value (in seconds) will be discarded as outdated. Useful to discard out of date locations when the GPS doesn’t work properly.

    Declaration

    Swift

    public var gpsLocationMaxAgeSeconds: Int
  • GPS updates that fall outside of this accurancy range (in meters) will be discarded as too inaccurate to be used.

    Declaration

    Swift

    public var gpsLocationMinHorizontalAccuracy: Int
  • Notified vSigns will be re-notified again once re-entered if the previous notification is older than this value (in seconds)

    Declaration

    Swift

    public var notifiedTimeoutSeconds: Int
  • Notified vSigns will be re-notified again once re-entered if the user has reached this min distance (in meters) from the vsign area.

    Declaration

    Swift

    public var notifiedMinDistanceInMeters: Double
  • Volume for the TTS messages

    Declaration

    Swift

    public var ttsVolume: Float
  • Language used to display and read vsign messages

    Declaration

    Swift

    public var language: QPLangCode?
  • Controls how often buffered metrics are sent to the API

    Declaration

    Swift

    public var syncMetricsInterval: Int { get set }
  • Controls how often buffered metrics are sent to the API

    Declaration

    Swift

    public var gpsDefaultAccuracy: CLLocationAccuracy { get set }
  • Automatically pauses GPS updates if the system determines updates are not strictly requires (e.g. the user hasn’t been moving for a while) to save battery.

    Declaration

    Swift

    public var gpsPausesLocationUpdatesAutomatically: Bool { get set }
  • Controls how often GPS updates are required, based on the user movements. For example, setting this to 5 meters will make the system sends GPS update events only if the user moves outside of a 5 meter radius from their last position.

    Declaration

    Swift

    public var gpsDistanceFilter: Int { get set }
  • Initialises settings from a serialised JSON data structure.

    Declaration

    Swift

    public required init?(json: JSON)
  • Serialises current settings values into JSON.

    Declaration

    Swift

    public func toJSON() -> JSON?
  • Declaration

    Swift

    public var engine: QPEngine?
  • Declaration

    Swift

    public init()
  • Stores current settings to System User Defaults

    Declaration

    Swift

    public func saveToUserDefaults()
  • Restores saved settings

    Declaration

    Swift

    public static func restoreFromUserDefaults() -> QPSettings