You are a mobile security program manager evaluating enterprise policy against this scenario.
A developer is informed that their iOS app stores user passwords in NSUserDefaults. What is the security problem with this approach and what is the correct alternative?
- A.The preferences store was deprecated in a recent release and a submission using it is rejected during review because the platform now requires a different storage interface: the correct alternative is the newer settings container, and the credential can stay where it is once the code is migrated to the replacement
- B.NSUserDefaults stores data in an unencrypted plist file in the app's container that can be easily read on a jailbroken device or accessed through iTunes/iCloud backup without encryption; passwords should be stored in the iOS Keychain, which encrypts data and ties access to device authentication state
- C.The preferences store is readable by another application that knows the key, and the sandbox does not cover it because the file lives in a shared area of the container: the correct alternative is the encrypted variant of the same interface, and the password stays out of reach of a second package on the handset