1

My app asks the user several questions then stores all the answers in a local sqlite database file (e.g. answers.db). No data is transmitted outside the phone but answers are stored to let the user reflect on her old/previous answers on a monthly/yearly basis. Some answers may include highly confidential / sensitive information (e.g. religion, health, etc.) and I am worried this file may pose a risk.

Can other apps installed in the same iPhone read this sqlite file? And can a file explorer copy/paste this file if the user connects the iPhone to her computer?

In summary: should I manually encrypt my app files or is Apple automatically taking care of this? I have browsed Apple security documentation and this information is difficult to find (for me).

Anyone knows?

1 Answer 1

1

You must actively encrypt sensitive data. This is the only way you can reliably manage the risk involved.

Every iOS application's data is stored within a container. In theory only your application and the operating system can access the contents of this container.

You can opt for the operating system to handle the encryption for your app:

Encrypting Your App’s Files

Protect the user’s data in iOS by encrypting it on disk.

Overview

Data protection is an iOS feature that you use to secure your app’s files and prevent unauthorized access to them. Data protection is enabled automatically when the user sets an active passcode for the device. You read and write your files normally, but the system encrypts and decrypts your content behind the scenes. The encryption and decryption processes are automatic and hardware accelerated.

Files containing personal information about the user, or files created directly by the user, always warrant the strongest level of protection. Assign the complete protection level to user data files and manage access to those files using the app delegate methods. The app delegate methods give you time to close the files before they become inaccessible to your app.

2
  • Thank you for the link. I read it says that by default, all file will be encrypted and key protected until the user unlocks the phone at least once after reboot. It looks like I can treat this as an "encrypted at rest by default". Looks good to me :) Thank you! Jan 22, 2020 at 13:34
  • @Starbuck3000 Good to hear the link helped. Please can you mark this answer as accepted. Jan 22, 2020 at 14:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .