LDStreamingMode

public enum LDStreamingMode

Defines the connection modes available to set into LDClient.

  • In streaming mode, the LDClient opens a long-running connection to LaunchDarkly’s streaming server (called clientstream). When a flag value changes on the server, the clientstream notifies the SDK to update the value. Streaming mode is not available on watchOS. On iOS and tvOS, the client app must be running in the foreground to connect to clientstream. On macOS the client app may run in either foreground or background to connect to clientstream. If streaming mode is not available, the SDK reverts to polling mode.

    Declaration

    Swift

    case streaming
  • In polling mode, the LDClient requests feature flags from LaunchDarkly’s app server at regular intervals defined in the LDConfig. When a flag value changes on the server, the LDClient will learn of the change the next time the SDK requests feature flags.

    Declaration

    Swift

    case polling