Realm Studio

What is Realm Studio?

Realm Studio is a developer tool for easily managing the Realm Database and Realm Platform. With Realm Studio, you can open and edit local and synced Realms, and administer any Realm Object Server instance. With Studio, you can perform basic tasks such as connecting to your instance, browsing data, and viewing logs.

Download The latest Version

To get started, pick your platform and download the application:

Download Older Versions

Need an older version of Realm Studio for compatibility? You can find all versions available for download here.

Release Notes

Want to know about the latest enhancements and bugfixes? Check out the release notes.

Connect with Realm Studio

Connecting to your cloud instance is easy with Realm Studio. Just click the "Connect to Realm Cloud" button and select your desired instance.

If you are sharing access to your cloud instance with another user, they can connect manually by clicking "Connect to Server".

You can get your instance URL by copying it from your cloud instances dashboard.

Viewing Data

Once connected you can browse to all of the synchronized Realms on the server and open them to view the data. Any changes you make to the data will be automatically synchronized to any other devices sharing the data.

Once you have logged into your server, you will be able to see a list of the available Realms:

Simply click on any Realm and you can view the data inside of it as well as create new objects manually.

Querying Data

While viewing the data within a Realm, you can filter the data by making queries. Queries are typed into the browser bar at the top of your Studio window. These queries follow the same syntax as our Realm JS SDK. For more information on the queries, you can press the ? button which is just to the right of the browser bar. It will take you to this page with a more detailed explanation.

In the screenshot below, you can see an example on how to perform a query. As you can see, this query filters the Item class for objects which are marked as false for the isDoneproperty. You'll notice that two objects are returned while 3 three objects exist within the class (noted by the 3 in the left pane).

Changing Schema

You can also use Studio to make changes to synchronized Realm schemas. This is limited to additive changes: creating new models and properties.

Export Model Definitions

During development, you may want to export your schema for consistency and ease of use across definitions. For example, you may have already created your schema in an existing iOS application and now need to declare the same schema in your Android app. Creating an exact matching object definition in another programming language by hand can be quite error-prone, so Studio allows you to export an definition based directly on the data in the Realm.

To do this, simply open up the Realm of interest. Open the "File" menu, and select "Save model definitions" as well as the desired syntax.

Viewing Special Realms

If working with query-based sync or performing administrative tasks, it is possible that you may want to view certain Realms that are hidden by default. Simply click on the "View" menu and select which Realms you need to view.

For example, you may want to view a user's "partial" Realm to get a view of what data is being synchronized to their device.

System Classes: __ Models

When using query-based synchronization, you may notice that a number of special models are created inside of your Realm. They are prefaced with "__" and are used as part of the internal sync system. These models are as follows:

  • __Class

  • __DefaultRealmVersion

  • __Permission

  • __Realm

  • __Role

  • __User

When connected to a server, Realm Studio allows you to administer users.

Viewing and Editing Permissions

Studio allows you view and edit the permission of a Realm, Class, or Object for reference realms using query-based synchronization. The options follow the permission standards as described here. Detailed description of each toggle can be viewed through a tooltip by hovering over each letter. By doing this, you can easily create some basic permissions data which can then be retrieved later via our APIs and then applied at scale to other objects, classes, and Realms.

Administering Users

Studio allows you to view, create, and modify users from the Users tab.

Create Users

You can create a new username/password user.

Update Existing Users

With existing users, you can change their type (regular or administrator) from the right hand pane. If the user was created via username/password provider you can change their password. Finally, you can delete the user as well.

Viewing Logs

When connected to a server, Realm Studio allows you to view the server logs from the Logs tab. You can easily adjust the logging level in the bottom right hand corner. When troubleshooting an issue, it is likely that debug level logs will help.

Browsing Local Realms

Realm Studio allows you to open local Realm files and view the data. Once opened, you can edit data and save changes to the Realm.

If you are working with Realm files on a device, you will need to transfer them to the machine running Realm Studio.

Viewing Realms From Emulators

Studio allows you to live-observe (and edit) any Realm local to it. This can be very useful during mobile app development, since you can run an emulator on the same machine as Realm Studio and observe Realms in real time while debugging your app. The only challenge is that emulators often make it really hard to find their local files.

Fortunately you can get the on-disk storage location from the Realm configuration: dump it to the debug console, and then use that path to open the Realm in Studio:

// Get on-disk location of the default Realm
let realm = try! Realm()
print("Realm is located at:", realm.configuration.fileURL!)

Importing Data

Realm Studio supports the ability to create a Realm file from CSV. To do so, go to File then Create Realm from --> CSV.

Note that when importing from CSV, the first row will be used as the object properties.

For example, a CSV formatted like:

data.csv
device,number,flag
gizmo,1,TRUE
widget,2,FALSE

This will result in a model named datathat has three properties: device which will be a string, number which will be an int and flag which will be a bool

Not what you were looking for? Leave Feedback

Last updated