Core Data Debug Flags - How to find your SQLite DB location
Core Data Debug Flags - How to find your SQLite DB location
Core Data Debugging
To know the location of your SQLite database of your simulator you need to add the following command line argument to your project.
-
Go to
Product->Scheme->Edit Schemeand select run configurations. -
Select
Argumentstab -
Click + button under
Launch Arguments -
Add the following argument
-com.apple.CoreData.SQLDebug 1
There are 4 logging levels
- 1 : SQL Statements
- 2 : Values that are bound in the statement
- 3 : Fetched managed object IDs
- 4 : SQLite Explain statements.