0

This question is different from questions here, because of the app being mostly in the background.

It is a requirement for our application that we keep the data store encrypted.

Our current implementation is using SQLite using SQLCipher. The plan is to move to Core Data.

I'm looking for a solution to keep the data encrypted, while still accessible in the background and is not restricting in terms of queries-NSPredicates and migration (schema change).

Below are all the options I've been looking into:

  • NSFileProtectionComplete - will not allow file access in the background
  • encrypted-core-data - This library does appear to be kept up-to-date. However, I've had second thoughts about using it in production after seeing the list of known issues. Has anyone used this recently?
  • NSIncrementalStore - This was the way that Apple engineers recommended that we follow. encrypted-core-data is using this method.
  • Transformable Attributes in core data - is this solution scalable for larger data sets?

Does anyone have a recommendation that meets all of the criteria and can be used in production apps?

Community
  • 1
  • 1
dagnytaggart
  • 511
  • 7
  • 17

1 Answers1

0

I ran some proof-of-concept apps using each of the above options. I ran numbers and bench-maked it against our existing solution (SQLCipher). Looks like using core data with incremental store (encrypted-core-data) came out to be the best.

After analyzing runtime performance times for read, write and search on DB with small and large sizes, encrypted-core-data turned out to be the most efficient and simpler to implement.

dagnytaggart
  • 511
  • 7
  • 17