RemoteSettingsContext

public struct RemoteSettingsContext
extension RemoteSettingsContext: Equatable, Hashable

Remote settings context object

This is used to filter the records returned. We always fetch all records from the remote-settings storage. Some records could have a filter_expression. If this is passed in and the record has a filter_expression, then only returns where the expression is true will be returned.

See https://remote-settings.readthedocs.io/en/latest/target-filters.html for details.

  • 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?
  • String containing the XUL application app_id

    Declaration

    Swift

    public var appId: 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”, “WINNT”)

    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?
  • Form-factor of the device (“phone”, “tablet”, or “desktop”)

    Declaration

    Swift

    public var formFactor: String?
  • Country of the user.

    This is usually populated in one of two ways:

    • The second component of the locale
    • By using a geolocation service, which determines country via the user’s IP. Firefox apps usually have a module that integrates with these services, for example Region on Desktop and RegionMiddleware on Android.

    Declaration

    Swift

    public var country: String?
  • Extra attributes to add to the env for JEXL filtering.

    Use this for prototyping / testing new features. In the long-term, new fields should be added to the official list and supported by both the Rust and Gecko clients.

    Declaration

    Swift

    public var customTargettingAttributes: [String : String]?
  • Declaration

    Swift

    public init(
        /**
         * The delivery channel of the application (e.g "nightly")
         */channel: String? = nil, 
        /**
         * User visible version string (e.g. "1.0.3")
         */appVersion: String? = nil, 
        /**
         * String containing the XUL application app_id
         */appId: String? = nil, 
        /**
         * The locale of the application during initialization (e.g. "es-ES")
         */locale: String? = nil, 
        /**
         * The name of the operating system (e.g. "Android", "iOS", "Darwin", "WINNT")
         */os: String? = nil, 
        /**
         * The user-visible version of the operating system (e.g. "1.2.3")
         */osVersion: String? = nil, 
        /**
         * Form-factor of the device ("phone", "tablet", or "desktop")
         */formFactor: String? = nil, 
        /**
         * Country of the user.
         *
         * This is usually populated in one of two ways:
         * - The second component of the locale
         * - By using a geolocation service, which determines country via the user's IP.
         * Firefox apps usually have a module that integrates with these services,
         * for example `Region` on Desktop and `RegionMiddleware` on Android.
         */country: String? = nil, 
        /**
         * Extra attributes to add to the env for JEXL filtering.
         *
         * Use this for prototyping / testing new features.  In the long-term, new fields should be
         * added to the official list and supported by both the Rust and Gecko clients.
         */customTargettingAttributes: [String: String]? = nil)
  • Declaration

    Swift

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

    Swift

    public func hash(into hasher: inout Hasher)