RLMAppConfiguration

Objective-C

@interface RLMAppConfiguration : NSObject <NSCopying>

Swift

@_nonSendable(_assumed) class RLMAppConfiguration : NSObject, NSCopying

Properties representing the configuration of a client that communicate with a particular Realm application.

RLMAppConfiguration options cannot be modified once the RLMApp using it is created. App’s configuration values are cached when the App is created so any modifications after it will not have any effect.

  • A custom base URL to request against. If not set or set to nil, the default base url for app services will be returned.

    Declaration

    Objective-C

    @property (nonatomic, strong, null_resettable) NSString *baseURL;

    Swift

    var baseURL: String! { get set }
  • The custom transport for network calls to the server.

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) id<RLMNetworkTransport> transport;

    Swift

    var transport: (any RLMNetworkTransport)? { get set }
  • The default timeout for network requests.

    Declaration

    Objective-C

    @property (nonatomic) NSUInteger defaultRequestTimeoutMS;

    Swift

    var defaultRequestTimeoutMS: UInt { get set }
  • If enabled (the default), a single connection is used for all Realms opened with a single sync user. If disabled, a separate connection is used for each Realm.

    Session multiplexing reduces resources used and typically improves performance. When multiplexing is enabled, the connection is not immediately closed when the last session is closed, and instead remains open for RLMSyncTimeoutOptions.connectionLingerTime milliseconds (30 seconds by default).

    Declaration

    Objective-C

    @property (nonatomic) BOOL enableSessionMultiplexing;

    Swift

    var enableSessionMultiplexing: Bool { get set }
  • Options for the assorted types of connection timeouts for sync connections.

    If nil default values for all timeouts are used instead.

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) RLMSyncTimeoutOptions *syncTimeouts;

    Swift

    @NSCopying var syncTimeouts: RLMSyncTimeoutOptions? { get set }
  • Create a new Realm App configuration.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithBaseURL:(nullable NSString *)baseURL
                                  transport:
                                      (nullable id<RLMNetworkTransport>)transport;

    Swift

    init(baseURL: String?, transport: (any RLMNetworkTransport)?)

    Parameters

    baseURL

    A custom base URL to request against.

    transport

    A custom network transport.

  • Create a new Realm App configuration.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithBaseURL:(nullable NSString *)baseURL
                                  transport:
                                      (nullable id<RLMNetworkTransport>)transport
                    defaultRequestTimeoutMS:(NSUInteger)defaultRequestTimeoutMS;

    Swift

    init(baseURL: String?, transport: (any RLMNetworkTransport)?, defaultRequestTimeoutMS: UInt)

    Parameters

    baseURL

    A custom base URL to request against.

    transport

    A custom network transport.

    defaultRequestTimeoutMS

    A custom default timeout for network requests.