Navigation

Initialize the Realm App Client

Overview

The Realm Realm app client is the interface to the MongoDB Realm backend. It provides access to the authentication functionality, functions, and sync management.

Access the App Client

Pass the Realm app ID for your Realm app, which you can find in the Realm UI.

let app = RealmApp(id: "my-realm-app-id")

Configuration

You can pass a configuration object to RealmApp:

let configuration = AppConfiguration(
    baseURL: "https://realm.mongodb.com", // Custom base URL
    transport: nil, // Custom RLMNetworkTransportProtocol
    localAppName: "My App",
    localAppVersion: "3.14.159",
    defaultRequestTimeoutMS:30000
);

let app = RealmApp(id: "my-realm-app-id", configuration: configuration)