A developer's iOS app uses the Camera API. During App Store review, the app is rejected because the NSCameraUsageDescription key is missing from the app's Info.plist. What role does this key play?
- A.A. It grants the app a special hardware entitlement to access the rear camera sensor
- B.B. It provides the user-facing purpose string displayed in the iOS permission dialog when the app requests camera access; its absence causes a crash on iOS 10+ and is an App Store review requirement
- C.C. It configures the camera resolution and frame rate for the app at the OS level
- D.D. It registers the app with Apple's privacy manifest system for camera data collection declarations
Why B is correct
NSCameraUsageDescription is a required Info.plist key for any app that requests camera access. iOS displays the string value of this key in the permission prompt shown to users. Without it, the app crashes when it calls AVCaptureSession or UIImagePickerController on iOS 10+, and Apple's App Review process rejects apps missing this key. It does not grant hardware entitlements, configure camera hardware settings, or serve as a privacy manifest declaration (which is a separate mechanism).
Know someone studying for Mobile Security Fundamentals? Send them this one.