Skip to main content
The MetaMap iOS SDK requires specific iOS permissions to access device features necessary for identity verification. These permissions must be declared in your app’s Info.plist file.
Failing to add these permissions will cause the app to crash when the SDK attempts to access the corresponding features. iOS requires usage description strings for all sensitive permissions.

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 your Info.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

  1. Select your project in the Project Navigator
  2. Select your app target
  3. Go to the “Info” tab
  4. Click the ”+” button to add new entries
  5. Search for and add each permission key
  6. Enter the usage description in the “Value” column

Method 2: Editing Info.plist Directly

  1. Locate Info.plist in your project
  2. Right-click and select “Open As” > “Source Code”
  3. Add the permission keys and descriptions
  4. Save the file

Runtime Permission Handling

While adding permissions to Info.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

  1. Clear Descriptions: Write clear, user-friendly permission descriptions that explain why each permission is needed
  2. Localization: Localize permission descriptions for better user experience in different regions
  3. Pre-flight Checks: Check permission status before launching MetaMap SDK to provide better user guidance
  4. Graceful Handling: Handle permission denials gracefully and guide users to enable them
  5. Minimal Permissions: Only request permissions when they’re actually needed

Troubleshooting

App Crashes When Accessing Camera

If your app crashes immediately when trying to access the camera, verify that NSCameraUsageDescription is properly added to your Info.plist.

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:
  1. Fresh Install: Test on a device without your app installed
  2. Permission Reset: Reset permissions in device settings
  3. Different States: Test granted, denied, and not-determined states
  4. 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.