RemoteSettingsService

open class RemoteSettingsService:
    RemoteSettingsServiceProtocol

Application-level Remote Settings manager.

This handles application-level operations, like syncing all the collections, and acts as a factory for creating clients.

  • Declaration

    Swift

    required public init(unsafeFromRawPointer pointer: UnsafeMutableRawPointer)
  • Construct a [RemoteSettingsService]

    This is typically done early in the application-startup process

    Declaration

    Swift

    public convenience init(storageDir: String, config: RemoteSettingsConfig2) throws
  • Create a new Remote Settings client

    Declaration

    Swift

    open func makeClient(collectionName: String, appContext: RemoteSettingsContext?) throws -> RemoteSettingsClient
  • Sync collections for all active clients

    Declaration

    Swift

    open func sync() throws -> [String]
  • Update the remote settings config

    This will cause all current and future clients to use new config and will delete any stored records causing the clients to return new results from the new config.

    Only intended for QA/debugging. Swapping the remote settings server in the middle of execution can cause weird effects.

    Declaration

    Swift

    open func updateConfig(config: RemoteSettingsConfig2) throws