Implementing and Testing iOS data protection

Update: With iOS 6 it’s supposedly possible to require data protection for your application by using an entitlement that needs to be configured on the App ID in the iOS provisioning profile. I haven’t tested this yet, and this is the best information I could find on it https://devforums.apple.com/message/707939#707939 My investigations into this matter lead … Read more

How can I find out if the iPhone user currently has a passcode set and encryption enabled?

Disclaimer: This answer was valid until ios 4.3.3 If data protection is turned on, a newly created file will have a nil NSFileProtectionKey by default. If data protection is turned off, a newly created file will have a NSFileProtectionNone NSFileProtectionKey by default. Thus, you could detect the presence of file protection with the following code: … Read more