How to correctly configure path for the Realm DB-file (<db_name>.realm) in iOS project?
<p>Sorry for my english.</p>

<p>I have developed a mobile application that needs its own local data store. I chose Realm as the database management system. In the process of studying the Realm documentation I had no problems with the database design, it's normalization, the CRUD-operations and everything that is related directly to the code.</p>

<p>I was confused following. I test my application in the simulator. I did not create the local database. I’ve just done it as it is written in the documentation of Realm. Realm created by itself its database and I did not specify any settings. The location of my file with database is given below:<br>
/Users/macbookpro/Library/Developer/CoreSimulator/Devices//EFECD945-285C-494F-8C1B-950D9AA05147/data/Containers/Data/Application/8D71FF0A-60D2-4875-96BB-36955E80D505/Documents/default.realm.</p>

<p>I quite inconvenient to apply each time this path for the analyzing of records in the database. The file is stored at this path is inaccessible for Realm Browser, because I need root privileges. I have seen that people store their .realm-files in project directory. Answer me please - how can I do it? Would it be the right alternative?</p>

<p>I have repeatedly seen the code, where paths to the database file appeared. For example, here: <a href="https://github.com/pietbrauer/CarthageRealmUploadFailureExample/blob/master/Carthage.checkout/realm-cocoa/examples/ios/swift/Migration/AppDelegate.swift" rel="nofollow">https://github.com/pietbrauer/CarthageRealmUploadFailureExample/blob/master/Carthage.checkout/realm-cocoa/examples/ios/swift/Migration/AppDelegate.swift</a>
I'm not sure if it's the right direction.</p>

<p>As a result, I want to: </p>

<p>1) have on hand a database file and be able to quickly refer to it;</p>

<p>2) know the algorithm - how to set own path to the Realm-database
    file;</p>

<p>3) know what realm configuration must be on a real device, to
    ensure security and data integrity.</p>

<p>Thank you very much to all!</p>