RLMWaitForSyncMode

Objective-C

enum RLMWaitForSyncMode : NSUInteger {}

Swift

@_nonSendable(_assumed) enum WaitForSyncMode : UInt, @unchecked Sendable

Determines wait for download behavior when subscribing on RLMResults.

See

[RLMResults subscribeWithName:waitForSync:onQueue:completion:]
  • subscribeWithName‘s callback will be invoked once matching objects are downloaded from the server only when the subscription is created the first time. If the subscription already exists, the callback is invoked without waiting for new downloads.

    Declaration

    Objective-C

    RLMWaitForSyncModeOnCreation

    Swift

    case onCreation = 0
  • subscribeWithName‘s callback will wait for downloads before being invoked. The callback can’t be invoked in this mode unless an internet connection is established or a timeout is set.

    Declaration

    Objective-C

    RLMWaitForSyncModeAlways

    Swift

    case always = 1
  • subscribeWithName‘s callback is always invoked without waiting for downloads.

    Declaration

    Objective-C

    RLMWaitForSyncModeNever

    Swift

    case never = 2