Navigation

MongoDB Realm iOS SDK

The MongoDB Realm iOS SDK enables client applications on the iOS, macOS, tvOS, and watchOS platforms to access data stored in local realms and interact with MongoDB Realm services like Functions, MongoDB Data Access, and authentication. The iOS SDK supports both Swift and Objective-C applications.

Note

The iOS SDK does not support Swift or Objective-C applications written for environments other than iOS, macOS, tvOS, and watchOS.

Get Started

To learn how to install the MongoDB Realm iOS SDK library as a dependency to your application, see Install Realm for iOS, macOS, tvOS, and watchOS.

To get started quickly with some Swift or Objective-C code, see the Quick Start.

The Realm Data Model

You can store a wide variety of data within realms stored on your device. With Realm Sync, you can share updates to that data across client devices and MongoDB Atlas.

For information about the structure of data you can store in realms, see Realms, Objects, and Relationships.

To learn about the results returned from realm queries, see Collections.

To gracefully update the schema to a new version at runtime, see Migrations.

Work with Realm Database

Once you have defined a data model for your application, you need to be able to write and read pieces of data to and from your realms.

To learn how to refine and sort the results of queries, see Query Engine.

For information about how to react to changes in realm data, see Notifications.

For advice on how to safely interact with Realm Database across threads in an application, see Threading.

Work with MongoDB Realm

The iOS SDK also connects your Realm client application with your Realm app’s backend services, including Functions, Services, Webhooks, Realm Sync, and built-in third-party authentication.

To get connected to your MongoDB Realm app, see Initialize the RealmAppClient.

To learn how to connect to a MongoDB Realm app to call Functions, query data in an instance of MongoDB Atlas, and synchronize data in realms, see Call a Function.

To learn how to handle schema updates in your client application, see Migrations.

Reference

MongoDB Realm uses additional support files, detailed in Auxiliary Files.