Included in this folder are sample iOS/OSX apps using Realm.
The following examples are located in the ios/objc/RealmExamples.xcodeproj
project:
This app covers several introductory concepts about Realm. Without any UI distractions, just a little console output.
This app demonstrates how Realm can be the data source for UITableViews.
You can add rows by tapping the add button and remove rows by swiping right-to-left.
The application also demonstrates how to import data in a background thread.
A sample app to demonstrate how to use Realm to populate a table view with sections.
This example showcases Realm's migration features.
Using data from FourSquare, this example demonstrates how to populate a Realm with external json data.
This simple app shows how to use an encrypted realm.
This simple app demonstrates how to define models with inverse relationships using -linkingObjectsOfClass:forProperty:
.
This is a simple drawing app designed to show off the collaborative features of the Realm Mobile Platform.
Any number of users may draw on a single shared canvas in any given moment, with contributions from other devices appearing on the canvas in real-time.
- Download the macOS version of the Realm Mobile Platform.
- Run a local instance of the Realm Mobile Platform.
- Open the Realm Object Server Dashboard in your browser by visiting 'http://localhost:9080'.
- Create a user account with the email 'demo@realm.io' and the password 'password'.
- Build the Draw app and deploy it to iOS devices on the same network as your Mac.
In the ios/swift/RealmExamples.xcodeproj
project, you will find the following examples:
This is a Swift Playground that goes over a few Realm basics.
This app covers several introductory concepts about Realm. Without any UI distractions, just a little console output.
This app demonstrates how Realm can be the data source for UITableViews.
You can add rows by tapping the add button and remove rows by swiping right-to-left.
The application also demonstrates how to import data in a background thread.
A sample app to demonstrate how to use Realm to populate a table view with sections.
This example showcases Realm's migration features.
This simple app shows how to use an encrypted realm.
This simple app demonstrates how to define models with inverse relationships using linkingObjectsOfClass(_:forProperty:)
.
This app demonstrates how to define Projection on Realm Object and how to use it in SwiftUI application.
These two targets demonstrate how to use Realm to persist data between an App Clip and its parent.
Note: This is only supported for non-synchronized realms.
For the purpose of this example, the app clip invocation and parent application download is simulated by running each target.
For more information on complete App Clip flow see: Responding to invocations and Launch Experience.
Note: When testing App Group Entitlements on MacOS (including the iOS simulator), containerURL(forSecurityApplicationGroupIdentifier:)
will always return the shared directory URL, even when the group identifier is invalid. Be sure to test on physical devices with non-simulated iOS for expected security behavior. See Return Value.
In the osx/objc/RealmExamples.xcodeproj
project, you will find the following examples:
This is a small OS X command-line program which demonstrates how to import data from JSON into a Realm.
Open the project in Xcode, and press "Run" to build and run the program. It will write output to the console.
The installation/
directory contains example Xcode projects demonstrating how
to install Realm Objective-C and Realm Swift from all available methods defined
in https://www.mongodb.com/docs/atlas/device-sdks/sdk/swift/install/#install-realm-for-ios--macos--tvos--and-watchos.
A tvOS app that demonstrates how to use Realm to store data and display data from a REST API.
A tvOS app that demonstrates how to use a Realm file included in your app bundle.
A tvOS app that demonstrates how to use Realm to store data and display data from a REST API.
A tvOS app that demonstrates how to use a Realm file included in your app bundle.