Realm Cookbook

Freshly baked code for the Realm Platform

The Realm Cookbook collects recipes for working with the Realm Platform. A recipe is just a description of how to perform a small task with Realm, either on the Realm Database or the Realm Object Server (or both), with code samples.

Recipes

Pass an object to a background thread

Hand a Realm object or query result to a background transaction for further processing.

Language: Swift

Convert a local Realm to a synced Realm

Take a local Realm file and add it to an Realm Object Server as a new synced Realm.

Language: Objective-C, JavaScript

Sample UI for LoginKit

The LoginKit can be pulled into your app to prompt the user for credentials and then use those credentials to open a synced Realm

Language: Swift, Objective-C

Find all Realms accessible by a given user as Function

This code shows an example backend function and example test client that will open the __admin realm and return a list of realms that the user has access to.

Language: JavaScript

User Search Event Handler

How to search a larger Realm on ROS from a mobile app OR how to search for users. This sample app demonstrates how to stream a subset of data from a public Realm file to a single user’s private Realm.

Language: JavaScript