iOS CapabilitiesLesson 59Free preview
Privacy & Permissions
This lesson is part of Swift · All levels
Summary
This lesson reviews the privacy and user permissions configuration on iOS. Apple greatly promotes user data privacy; access to sensitive hardware such as cameras, GPS locations, microphones, and photo galleries is required to be registered in a Info.plist file with clear and transparent text of the reason for use (Usage Description).
Key points
- Any access to sensitive hardware/data must include a 'Usage Description String' in Info.plist
- Key for example: NSCameraUsageDescription, NSPhotoLibraryUsageDescription
- The application will crash instantly if you try to access the camera/location without the key configuration in Info.plist
- The system consent dialog only appears once; if rejected, the user must be redirected to the iOS Settings app
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.