realm Print file location - Swift


Example

Add the following line to ViewDidLoad method:

print(Realm.Configuration.defaultConfiguration.fileURL!)

The line above will print the location to Xcode's console. Copy the file path, go to Finder → Go → Go to Folder... (or ⌘+⇧+G)→ paste the path and hit Go.