Install Realm for iOS, macOS, tvOS, and watchOS¶
MongoDB Realm's Swift SDK enables your iOS, macOS, tvOS, and watchOS applications to interact with MongoDB Realm using either the Swift or Objective-C programming languages. This page details how to install Realm in your project and get started.
Before getting started, ensure your development environment meets the following prerequisites:
- Xcode version 11.3 or higher.
- Target of iOS 9.0 or higher, macOS 10.9 or higher, tvOS 9.0 or higher, or watchOS 2.0 or higher.
- If using Swift Package Manager, target of iOS 11+ or macOS 10.10+ is required.
There are special considerations when using Realm Database with tvOS. See Build for tvOS for more information.
You can use
Carthage to add the
MongoDB Realm Swift SDK to your project.
Add the following line at the top of your source files to use MongoDB Realm:
If you have build issues after using one of these methods to install Realm, see our troubleshooting guidelines for information about resolving those issues realm.