-1

The file directory I am getting when doing the

print(Realm.Configuration.defaultConfiguration.fileURL!)

is as follows:

file:///var/mobile/Containers/Data/Application/825DF5F3-AF1E-47B6-80C4-D3CCCC90CD8C/Documents/default.realm

Now, the strange thing is that when I do the Shift+Command+G to copy this into my finder then it only shows me the var directory, which does not contain the "mobile" directory. Also, when I do a search for the .realm file there is no such file on my Mac. Can somebody telling me what's going on?

kangarooChris
  • 718
  • 1
  • 10
  • 21
  • still not finding the file. I can find the file:///var/ directory , but in there is no "mobile directory (I also checked hidden files) . – kangarooChris Oct 23 '18 at 10:51
  • I noticed that in all references to this topic the file path is something like this: /Users//Library/Developer/CoreSimulator/Devices//data/Containers/Data/Application//Documents/default.realm..........so, why is my Xcode/Realm creating a different file path – kangarooChris Oct 23 '18 at 12:31

1 Answers1

0

well, I finally figured it out. I ran my app on my iPhone because I can't use the simulator since I need the camera. This is why it gave me the var/mobile directory. I found this detailed explanation about what to do when the app runs on the device rather than the simulator: How to find my realm file?.

kangarooChris
  • 718
  • 1
  • 10
  • 21