I am maintaining an iOS app that currently uses Core Data to get data off a db and populate a table view. A new requirement has come up that the entire database must be encrypted with SQLCypher and based on my research, Core Data refuses to play nice with the cypher. So it has been decided that coredata support be removed and database calls now must be made by hand. In this case, is there any library/project out there that emulates the functionality of the NSFetchedResults in CoreData that manages the db interaction and plays nice with TableViews?
I am looking for advice on architecting the project in a way to have the lowest amount of code littered with sql statements to do the db interaction. Can anyone please advice on how this can be accomplished?
Thanks
Maybe this solution can help you keep Core Data and provide encryption for the contents.
Let’s say we have a Core Data object named MyObject with one attribute MyData. Then set the property transient for this attribute in the CoreData model. Now define a second attribute MySecretData with the attribute type Binary Data. This is where the actual data will be stored.
Now create a category on the NSManagedObject subclass like this:
In this case the data is encrypted and also deflated. From your code you can access MyData as usual. Inside the Core Database all values will be encrypted. Of course you have to use proper crypto functions.