Docs Menu

Connect to a MongoDB Realm Backend App - Swift SDK

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

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

let app = App(id: YOUR_REALM_APP_ID) // replace YOUR_REALM_APP_ID with your App ID

You can pass a configuration object to RealmApp:

let configuration = AppConfiguration(
baseURL: "", // Custom base URL
transport: nil, // Custom RLMNetworkTransportProtocol
localAppName: "My App",
localAppVersion: "3.14.159",
defaultRequestTimeoutMS: 30000
let app = App(id: "my-realm-app-id", configuration: configuration)
←  Bundle a Realm File - Swift SDKWork with Users - Swift SDK →
Give Feedback
© 2022 MongoDB, Inc.


  • Careers
  • Investor Relations
  • Legal Notices
  • Privacy Notices
  • Security Information
  • Trust Center
© 2022 MongoDB, Inc.