Explore a Realm File¶
When you open a realm file in Realm Studio, you can:
- View live objects in realtime
- Query objects in the realm
- Export SDK model definitions
This makes it a valuable tool for developing and debugging applications backed by Realm Database.
View Live Objects in Realtime¶
Realm Studio gives you the ability to view live objects while you're running a client app in an emulator. You can see how functions in your app are transforming objects in realtime. This is a powerful debugging and development tool.
To view live objects in Realm Studio, you'll need to find your realm file. Once you know your realm file path, you can open it in Realm Studio while your app is running.
Unfortunately, Android emulators do not support viewing live objects in Realm Studio. If you're developing for Android, you must download the file from the emulator before you can access it.
Query Objects in the Realm¶
Realm Studio enables you to query the objects in the realm file. The ability to do this in the realm via Realm Studio gives you a visual tool to:
- Quickly view query results
- Experiment with query syntax
- Validate the data in the realm file
- Comparison operators
- Logical operators
- String operators
You can also view a reference document that details the query options from within Realm Studio. Press the ? button next to the query bar.
Export SDK Model Definitions¶
Realm Studio enables you to export model definitions, streamlining cross-platform development.
For example, you may be an iOS developer who has already created a schema in an existing app. You now need to declare the same schema for your Android app. Recreating that schema in another programming language can be time-consuming and error-prone. Instead, you can open your realm file in Realm Studio, and export the model definition in Java.
To export updated class definitions:
- Specify a name and destination for your new class definitions. Press the Save button.
If your destination directory does not already exist, Realm Studio creates it. Inside, you'll find a file that contains a complete list of classes and properties, including new additions.