Skip to main content
This guide walks you through installing the MetaMap iOS SDK using CocoaPods and configuring the required permissions.

Prerequisites

Before you begin, ensure you have:
  • Xcode 12.0 or later installed
  • iOS 13.0+ as your deployment target
  • CocoaPods installed on your machine
  • A MetaMap account with Client ID and Flow ID
If you don’t have CocoaPods installed, run: sudo gem install cocoapods

Installation Steps

1

Create or Update Podfile

Navigate to your iOS project directory and create a Podfile if you don’t have one:
cd /path/to/your/project
pod init
Add the MetaMap SDK pod to your Podfile:
Podfile
platform :ios, '13.0'

target 'YourAppTarget' do
  use_frameworks!
  
  # MetaMap iOS SDK
  pod 'MetaMapSDK', '3.23.14'
end
For the LTS version, use pod 'MetaMapSDK', '3.22.8'
2

Install Dependencies

Run the following command in your terminal to install the SDK:
pod install
This will download the MetaMap SDK and its dependencies (approximately 30 MB).
Always open your project using the .xcworkspace file after installing CocoaPods, not the .xcodeproj file.
3

Configure Info.plist Permissions

Add the required privacy permissions to your Info.plist file. The SDK requires access to the camera, photo library, microphone, and optionally location.
Add the following keys to your Info.plist:
Info.plist
<key>NSCameraUsageDescription</key>
<string>MetaMap needs access to your Camera</string>

<key>NSPhotoLibraryUsageDescription</key>
<string>MetaMap needs access to your media library</string>

<key>NSMicrophoneUsageDescription</key>
<string>MetaMap needs access to your Microphone</string>

<key>NSLocationWhenInUseUsageDescription</key>
<string>MetaMap will use your location information to provide best possible verification experience.</string>

<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>MetaMap will use your location information to provide best possible verification experience.</string>

<key>NSLocationAlwaysUsageDescription</key>
<string>MetaMap will use your location information to provide best possible verification experience.</string>
Important: Without these permissions, the SDK will not function properly and will crash when attempting to access restricted resources.
4

Import the SDK

Import MetaMapSDK in your Swift files:
import MetaMapSDK
For Objective-C:
#import <MetaMapSDK/MetaMapSDK.h>

Verify Installation

To verify that the SDK is properly installed:
  1. Open your project workspace: open YourProject.xcworkspace
  2. Build your project (⌘ + B)
  3. Ensure there are no compilation errors
If the build succeeds, you’ve successfully installed MetaMap iOS SDK!

SDK Components

The MetaMap SDK installation includes the following frameworks:
  • MetaMapSDK.xcframework - Core SDK functionality
  • IncdOnboarding.xcframework - Onboarding flow components
  • opencv2.xcframework - Image processing capabilities

Troubleshooting

Update your CocoaPods repo:
pod repo update
pod install
Clean your build folder and reinstall:
pod deintegrate
pod install
Then clean your Xcode build folder (⌘ + Shift + K) and rebuild.
Ensure all required permission descriptions are added to your Info.plist. Missing permission descriptions will cause crashes when the SDK attempts to access those resources.

Next Steps

Quickstart Guide

Learn how to implement MetaMap verification in your app

Build docs developers (and LLMs) love