RemoteSettingsContext

public struct RemoteSettingsContext
extension RemoteSettingsContext: Equatable, Hashable

The RemoteSettingsContext object represents the parameters and characteristics of the consuming application. For remote-settings, it is used to filter locally stored records.

We always fetch all records from the remote-settings storage. Some records could have a filter_expression attached to them, which will be matched against the RemoteSettingsContext.

When set, only records where the expression is true will be returned.

  • Name of the application (e.g. “Fenix” or “Firefox iOS”)

    Declaration

    Swift

    public var appName: String
  • Application identifier, especially for mobile (e.g. “org.mozilla.fenix”)

    Declaration

    Swift

    public var appId: String
  • The delivery channel of the application (e.g “nightly”)

    Declaration

    Swift

    public var channel: String
  • User visible version string (e.g. “1.0.3”)

    Declaration

    Swift

    public var appVersion: String?
  • Build identifier generated by the CI system (e.g. “1234/A”)

    Declaration

    Swift

    public var appBuild: String?
  • The architecture of the device, (e.g. “arm”, “x86”)

    Declaration

    Swift

    public var architecture: String?
  • The manufacturer of the device the application is running on

    Declaration

    Swift

    public var deviceManufacturer: String?
  • The model of the device the application is running on

    Declaration

    Swift

    public var deviceModel: String?
  • The locale of the application during initialization (e.g. “es-ES”)

    Declaration

    Swift

    public var locale: String?
  • os

    The name of the operating system (e.g. “Android”, “iOS”, “Darwin”, “Windows”)

    Declaration

    Swift

    public var os: String?
  • The user-visible version of the operating system (e.g. “1.2.3”)

    Declaration

    Swift

    public var osVersion: String?
  • Android specific for targeting specific sdk versions

    Declaration

    Swift

    public var androidSdkVersion: String?
  • Used for debug purposes as a way to match only developer builds, etc.

    Declaration

    Swift

    public var debugTag: String?
  • The date the application installed the app

    Declaration

    Swift

    public var installationDate: Int64?
  • The application’s home directory

    Declaration

    Swift

    public var homeDirectory: String?
  • Contains attributes specific to the application, derived by the application

    Declaration

    Swift

    public var customTargetingAttributes: RsJsonObject?
  • Declaration

    Swift

    public init(
        /**
         * Name of the application (e.g. "Fenix" or "Firefox iOS")
         */appName: String, 
        /**
         * Application identifier, especially for mobile (e.g. "org.mozilla.fenix")
         */appId: String, 
        /**
         * The delivery channel of the application (e.g "nightly")
         */channel: String, 
        /**
         * User visible version string (e.g. "1.0.3")
         */appVersion: String?, 
        /**
         * Build identifier generated by the CI system (e.g. "1234/A")
         */appBuild: String?, 
        /**
         * The architecture of the device, (e.g. "arm", "x86")
         */architecture: String?, 
        /**
         * The manufacturer of the device the application is running on
         */deviceManufacturer: String?, 
        /**
         * The model of the device the application is running on
         */deviceModel: String?, 
        /**
         * The locale of the application during initialization (e.g. "es-ES")
         */locale: String?, 
        /**
         * The name of the operating system (e.g. "Android", "iOS", "Darwin", "Windows")
         */os: String?, 
        /**
         * The user-visible version of the operating system (e.g. "1.2.3")
         */osVersion: String?, 
        /**
         * Android specific for targeting specific sdk versions
         */androidSdkVersion: String?, 
        /**
         * Used for debug purposes as a way to match only developer builds, etc.
         */debugTag: String?, 
        /**
         * The date the application installed the app
         */installationDate: Int64?, 
        /**
         * The application's home directory
         */homeDirectory: String?, 
        /**
         * Contains attributes specific to the application, derived by the application
         */customTargetingAttributes: RsJsonObject?)
  • Declaration

    Swift

    public static func == (lhs: RemoteSettingsContext, rhs: RemoteSettingsContext) -> Bool
  • Declaration

    Swift

    public func hash(into hasher: inout Hasher)