Info.plist file.
Required Permissions
Camera Permission
Required for capturing photos of identity documents and selfies.Photo Library Permission
Required for accessing and uploading images from the user’s photo gallery.Microphone Permission
Required for voice liveness verification and video recording with audio.Location Permissions
Required for location-based verification and fraud prevention. You need to include all three location permission keys:Complete Info.plist Configuration
Add all required permissions to yourInfo.plist file:
Customizing Permission Descriptions
You can customize the usage description strings to better match your app’s branding and tone:Adding Permissions in Xcode
Method 1: Using Xcode’s Info Tab
- Select your project in the Project Navigator
- Select your app target
- Go to the “Info” tab
- Click the ”+” button to add new entries
- Search for and add each permission key
- Enter the usage description in the “Value” column
Method 2: Editing Info.plist Directly
- Locate
Info.plistin your project - Right-click and select “Open As” > “Source Code”
- Add the permission keys and descriptions
- Save the file
Runtime Permission Handling
While adding permissions toInfo.plist is required, the MetaMap SDK handles requesting permissions at runtime. However, you can check permission status in your app:
Checking Camera Permission
Checking Photo Library Permission
Checking Microphone Permission
Checking Location Permission
Guiding Users to Settings
If a permission is denied, guide users to app settings:Best Practices
- Clear Descriptions: Write clear, user-friendly permission descriptions that explain why each permission is needed
- Localization: Localize permission descriptions for better user experience in different regions
- Pre-flight Checks: Check permission status before launching MetaMap SDK to provide better user guidance
- Graceful Handling: Handle permission denials gracefully and guide users to enable them
- Minimal Permissions: Only request permissions when they’re actually needed
Troubleshooting
App Crashes When Accessing Camera
Permission Dialog Not Showing
- Ensure the permission key is spelled correctly in Info.plist
- Clean build folder (⇧⌘K) and rebuild
- Delete the app from device/simulator and reinstall
Location Permission Not Working
- Make sure all three location permission keys are added
- Check that you’re requesting the correct authorization level in code
- Verify location services are enabled on the device
Testing Permissions
Test your permission implementation:- Fresh Install: Test on a device without your app installed
- Permission Reset: Reset permissions in device settings
- Different States: Test granted, denied, and not-determined states
- Background Access: Test location permissions with app in background
The MetaMap SDK handles the actual permission requests at runtime. Your responsibility is to declare these permissions in Info.plist with appropriate descriptions.