For asking user permission developer must key-string pairs in Info.plist
<key>AppleKey</key>
<string>Developer's description to ask for permission from the user.</string>
Example:
If developer wants to use camera for video call, then user should ask for
1. photo gallery, 2. microphone, 3. camera
1.) <key>NSPhotoLibraryUsageDescription</key>
<string>This app requires access to the photo library for profile picture.</string>
2.) <key>NSMicrophoneUsageDescription</key>
<string>This app does not require access to the microphone for call.</string>
3.) <key>NSCameraUsageDescription</key>
<string>This app requires access to the camera for video call.</string>
Apple Document for properties list key references.: developer.apple.com
Few More Examples:
Apple Music:
<key>NSAppleMusicUsageDescription</key>
<string>Developer description to get permission to access this capability</string>
Bluetooth:
<key>NSBluetoothPeripheralUsageDescription</key>
<string>Developer description to get permission to access this capability</string>
Calendar:
<key>NSCalendarsUsageDescription</key>
<string>Developer description to get permission to access this capability</string>
Camera:
<key>NSCameraUsageDescription</key>
<string>Developer description to get permission to access this capability</string>
Contacts:
<key>NSContactsUsageDescription</key>
<string>Developer description to get permission to access this capability</string>
FaceID:
<key>NSFaceIDUsageDescription</key>
<string>Developer description to get permission to access this capability</string>
Health Share:
<key>NSHealthShareUsageDescription</key>
<string>Developer description to get permission to access this capability</string>
Health Update:
<key>NSHealthUpdateUsageDescription</key>
<string>Developer description to get permission to access this capability</string>
Home Kit:
<key>NSHomeKitUsageDescription</key>
<string>Developer description to get permission to access this capability</string>
Location:
<key>NSLocationUsageDescription</key>
<string>Developer description to get permission to access this capability</string>
Location (Always):
<key>NSLocationAlwaysUsageDescription</key>
<string>Developer description to get permission to access this capability</string>
Location (When in use):
<key>NSLocationWhenInUseUsageDescription</key>
<string>Developer description to get permission to access this capability</string>
Microphone:
<key>NSMicrophoneUsageDescription</key>
<string>Developer description to get permission to access this capability</string>
Motion (Accelerometer):
<key>NSMotionUsageDescription</key>
<string>Developer description to get permission to access this capability</string>
NFC (Near-field communication):
<key>NFCReaderUsageDescription</key>
<string>Developer description to get permission to access this capability</string>
Photo Library:
<key>NSPhotoLibraryUsageDescription</key>
<string>Developer description to get permission to access this capability</string>
Photo Library (Write-only access):
<key>NSPhotoLibraryAddUsageDescription</key>
<string>Developer description to get permission to access this capability</string>
Reminders:
<key>NSRemindersUsageDescription</key>
<string>Developer description to get permission to access this capability</string>
Siri:
<key>NSSiriUsageDescription</key>
<string>Developer description to get permission to access this capability</string>
Speech Recognition:
<key>NSSpeechRecognitionUsageDescription</key>
<string>Developer description to get permission to access this capability</string>
User Permissions iOS in info.plist
ReplyDeleteVery informative post...!
Well, good post for iOS developers...
Importance of iOS App Development For Enterprises
iOS development company