App rejected due to missing usage descriptions Xcode8
Master System Design with Codemia
Enhance your system design skills with over 120 practice problems, detailed solutions, and hands-on exercises.
Introduction
When developing iOS applications, ensuring compliance with App Store guidelines is crucial for successful submission and acceptance. One common reason for app rejection is missing usage descriptions, especially when the app leverages sensitive features. With Xcode 8, Apple introduced stringent requirements for specifying privacy usage descriptions. This article delves into why these usage descriptions are vital, how to properly implement them, and provides technical examples and solutions for developers.
Understanding Usage Descriptions
What Are Usage Descriptions?
Usage descriptions are strings that developers must include in their app’s `Info.plist` file. These descriptions justify why the app needs access to sensitive data or device capabilities such as the camera, microphone, location, and more. Specifying these descriptions is essential in maintaining user trust and complying with App Store review guidelines.
Why Are They Important?
- Transparency: Provides users with reasons why an app requires access to certain features or data, increasing transparency and user comfort.
- Compliance: Ensures adherence to Apple's privacy policies, reducing the risk of app rejection.
- User Trust: Strengthens user trust by clarifying data usage intentions.
Key Usage Description Keys
In Xcode 8, multiple usage description keys are available, each corresponding to a specific system capability or sensitive information. Here are some key-value pairs you might encounter:
- NSCameraUsageDescription: Access to the camera.
- NSMicrophoneUsageDescription: Access to the microphone.
- NSLocationWhenInUseUsageDescription: Access to location data while the app is in use.
- NSPhotoLibraryUsageDescription: Access to the photo library.
To declare these permissions, you include them in your app's `Info.plist` as follows:
- Omission: Forgetting to add a usage description for at least one feature your app accesses. Solution: Before submitting, cross-check your implementation with all system capabilities your app uses.
- Generic Descriptions: Using vague or generic descriptions that do not adequately explain the purpose. Solution: Write clear and specific descriptions tailored to each permission request.
- Coding Errors: Syntax errors in `Info.plist`. Solution: Use Xcode’s built-in plist editor to minimize errors.

