0

I use a x-code 5 to write an application to iPhone 4s with objective-C.

How can i create a data base file (*.sqlite) with password. every read or write a password need to be enter.

user3428151
  • 449
  • 6
  • 23
  • Use an implementation of SqlCipher. It's not provided by Apple and I'm not sure there are any free pre-built versions available, so you either have to pay for a version or port it yourself (which is certainly feasible but non-trivial). – Hot Licks Jul 03 '14 at 16:03
  • (I don't think the "duplicate" is, though there probably are other more appropriate duplicates that could be referenced.) – Hot Licks Jul 03 '14 at 16:08
  • [This page](http://sqlcipher.net/ios-tutorial) appears to tell you how to build SqlCipher for iOS. I've not reviewed it, though. (I actually couldn't find any reasonable "duplicates" in a brief search.) – Hot Licks Jul 03 '14 at 16:15
  • Hi i not received a correct answer. I need that the created data base file will be with password (db.sqlite) . today i use sqlite3. – user3428151 Jul 09 '14 at 10:07
  • If you want a password-protected file you must use SqlCiper or some other such package. Yes, you can use Apple's built-in file encryption, but with that you have to decrypt the entire file when the app starts, then re-encrypt when the app ends -- neither convenient nor secure. – Hot Licks Jul 09 '14 at 11:33

0 Answers0