Renato Souza de Oliveira
Renato Souza de Oliveira

Reputation: 4574

DB realm - how to access tables and records

sorry for the bad English.

I am developing a react native application and am using the realm database

I can save the records in the database. Is there client software to view the tables and records of a realm database? I installed realm studio on my machine, but I could not find the database to open it. I'm running the application directly on the mobile device.

The data is saved in the database. I used the command to find out the path of the database. I could not find the database inside the device.

console.log(Realm.defaultPath);

//result
/data/data/com.app/files/default.realm

Upvotes: 2

Views: 637

Answers (1)

scel.pi
scel.pi

Reputation: 703

Yes, you have realm studio. First download it on Realm Studio

Than you can use adb (if android) to download file with:

adb pull /data/data/com.app/files/default.realm .

If you are using iOS simulator (i dont think so due to uri) just go to the next step.

After download just open realm studio and find the file to open it. Or if you are a mac user type on console

open <path_to_downloaded_file>

Upvotes: 2

Related Questions