Question

I have a thread that keeps running in background after the device is locked. I have some files on the application and they are protected with NSFileProtectionComplete

How can I access the files after the user locks the device(after the 10 secs)?

Was it helpful?

Solution

Not the solution I wanted, but it works. I changed the protection to NSFileProtectionCompleteUntilFirstUserAuthentication

According to app docs with NSFileProtectionCompleteUntilFirstUserAuthentication "The file is stored in an encrypted format on disk and cannot be accessed until after the device has booted. After the user unlocks the device for the first time, your app can access the file and continue to access it even if the user subsequently locks the device."

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top