For iOS:


If you are running the application on an iOS simulator:


The realm file directories can be found at the path: 

/Users/<username>/Library/Developer/CoreSimulator/Devices/<simulator-uuid>/data/Containers/Data/Application/<application-uuid>/Documents/


If you are using Swift with Realm Swift, when running the application, pause the simulator and type the command :

po Realm.Configuration.defaultConfiguration.fileURL

 into the lldb console.


Another way the <simulator-uuid> can be found is in Xcode > Window > Devices and Simulators > Simulators. Click on the simulator you are building with to see the uuid under ‘Identifier’.


To find the <application-uuid>, when the application is running in the simulator, open the Mac utility ‘Activity Monitor’. Locate and double click on the application you are running. Under ‘Open Files and Ports’ search for the extension ID at the path ~/data/Containers/Data/Application/<uuid>. 


Note: There is another ID at the path ~/data/Containers/Bundle/Application/<uuid>. This contains the iOS app and not the realm files.


If you are running the application on an iOS device:


Once your device is connected open Xcode > Window > Devices and Simulators > Devices. Choose your desired device.


Navigate to the downloaded app on in the ‘Installed App’ section. With the correct app highlighted, select the gear icon underneath and choose ‘Download Container’


Navigate to the path you chose to download to. The file will be a xcappdata bundle. Right click and select ‘Show Package Contents’. The Realm files are located under /AppData/Documents.


For Android:


You'll need to copy the database from the emulator/phone to view it. That can be done by using ADB:

adb pull /data/data/<packagename>/files/ .


That command will pull all Realm files created using `Realm.getInstance(new RealmConfiguration.Builder().build())` . The default database is called `default.realm`


Note that this will only work on a emulator or if the device is rooted.


To find other realm files: 

You can also log the exact path from your app with: 

Log.d("", "path: " + realm.getPath());Log.d("", "path: " + realm.getPath())


For non-rooted devices: 

A community member has provided the following script which can be used


For Node.js:


Simply navigate to the working directory where you run your node scripts.  The realm files are present within a folder called `realm-object-server`