0

I am using a MacBook and I develop an android app using react native and realm database using Android Studio.

I have realm studio and I need to open the realm file from where it is stored instead of downloading it first, so that i can view my real data from where they are stored.

WHAT I HAVE TRIED

  1. Using Realm.defaultPath I have logged and see the location as /data/data/com.myapp/files/default.realm. But I could not find how to access it from Finder on my MacBook. How do I access it with Finder?

  2. Using Android studio I tracked the file via the View > Tool Windows > Device File Explorer and then go through that data/data/package_name/file_name. When doing this I get the file but this gives me the option of Downloading it and saving it somewhere else in order to view it on realm studio.

WHAT I WANT I want to be able to open the realm file using realm studio Directly from the location it is stored, so that I can see live changes of my data on the database.

How do I get that location and how do i do it?

Amani
  • 227
  • 1
  • 10
  • The question is unclear and am not sure if it's a coding question as all. Are you asking where Realm files are stored on your Mac? If that's the question, is this an iOS app, a Mac app or a sandboxed Mac app? – Jay Oct 24 '21 at 15:15
  • @Jay I am asking where the Realm file is stored on my mac (and how to navigate to find it) so that I can use realm studio to open the file directly from that location. And the app is the Android App developed using android studio on my mac. – Amani Oct 24 '21 at 16:53
  • I understand. Can you answer the question per my above comment? – Jay Oct 25 '21 at 17:52
  • @Jay As per your question, This is a React Native App, developed on a Mac. I know the realm file is stored in */data/data/com.myapp/files/default.realm*, now I want to be able to open this file with Realm Studio **directly from this location** without having to download it and store in a separate location(eg desktop), as I want to see *live* data change in realm studio as I interact with the realm database. – Amani Nov 23 '21 at 06:45
  • You should be able to locate the path by looking at the console. Once your app connect to realm at this line `console.log('* REALM PATH: ' + Realm.defaultPath);` which should output the path. It also appears this question was asked and answered previously. – Jay Nov 23 '21 at 18:17
  • Does this answer your question? [Find path for Realm file with Realm React Native to use with Realm Browser](https://stackoverflow.com/questions/36517440/find-path-for-realm-file-with-realm-react-native-to-use-with-realm-browser) – Jay Nov 23 '21 at 18:17

0 Answers0