Reputation: 353
Just curious if we can access the core data database through sqlite queries. On the process of searching, I've found Chris Miles' post for debugging core data with sqlite. Here, he points out that we can use the terminal to input sqlite queries and then actually access the core data database.
Kindly clarify if this is possible through objective - c code. If this can be done, may I ask some links for good tutorials I can study on. Thanks!
Upvotes: 0
Views: 89
Reputation: 31026
You can certainly make C sqlite3 calls from inside Objective-C methods. However, if you've gone to the trouble of defining your data model in Core Data and creating a managed object environment, it's hard to imagine why you would want to circumvent that.
Consider also that there's no guarantee that the current table layout under Core Data will stay the same with the next iOS release, so anything your assume about the storage is fragile.
Upvotes: 2