← back to the blog

How to locate Sql sqlite / .sqlite file for IOS Core Data application , SwiftUI Core Data Debug

Posted on February 23rd, 2020 in Swift by George


Here is how you can locate the Core Data SQLite file in your local machine.

1. Use the top menu in Xcode and navigate to Product-> Scheme -> Edit Sceme, then select Run Debug and under Arguments Passed on Launch add "-com.apple.CoreData.SQLDebug 4". The number represents the log details you are after from 1 to 4. (1 minimal to 4 full logs) 


See screenshot below: 


2. Then run your Core Data application as normal and have a look at your debug console.

Soon as you run the application you will see "CoreData: annotation: Connecting to sqlite database file at "... file location 



Thank you