In this lesson
- Install Realm Browser
- Open Realm file
- Explore data
Tap on time to skip ahead
So far in our application, it’s been real easy to create people and addresses and see those changes through our application UI. However, when you’re developing a more robust application with multiple screens and multiple types of models and objects and what not, that might not be the most ideal work flow. So with this in mind, the fine people at Realm have created a specialized application called Realm Browser. You can use it to see your data outside of your application.
Using Realm Browser to Inspect the Realm File
So you can get the Realm Browser through that Apple Appstore for OS X. And as you can see here I’ve already installed it. And if I open up Realm I can open up our address Realm file by using SimPholders – which I find is a very useful tool. And here we’ll see the documents folder. If I drag it over into our Realm Browser, it’ll navigate to it and I can hit open. And then it’ll ask for access and I’ll press continue. We can immediately see the people that we have added to our address book in our application.
Navigating and Changing Data in Realm Browser
We can also navigate to any sort of children objects like so, and we also have the handy back and forth browser like buttons. That will let us dive deep into our different structures as well as come back out the way we came. And if I select a model here I can look for a particular model. So I can type in “Ben” and it’ll show me a model that has a name “Ben.” I can even go in here if I so want to and change Ben’s name to Benjamin. (He’s sophisticated like that.)
If I wanna see this change in my application, I need to quit the Realm Browser first – because only one application at a time can have your Realm database open. And so now if we run our application, we see the change like so. So you can see the Realm Browser application can be a very handy tool in your app development tool belt as you develop your applications that are using Realm.