Skip to main content

Overview

This guide shows you how to integrate the MetaMap SDK into your UIKit-based iOS application using the MetaMapButton component.

Prerequisites

  • MetaMap SDK installed via CocoaPods
  • iOS 13.0 or later
  • Swift 5.7 or later

Implementation

Basic Setup

Here’s a complete implementation of MetaMap verification in a UIKit view controller:

Key Components

1. Initialize MetaMapButton

Create an instance of MetaMapButton in your view controller:

2. Add Button Action

Connect the button to an action handler:

3. Configure Button Layout

Set the button’s frame and add it to your view:

4. Set Delegate

Assign the delegate to receive verification results:

5. Launch Verification Flow

In your button action handler, call showMetaMapFlow with your credentials:

Handling Results

Implement the MetaMapButtonResultDelegate protocol to handle verification results:

Delegate Methods

  • verificationSuccess(identityId:verificationID:) - Called when verification completes successfully
  • verificationCancelled() - Called when the user cancels the verification process

Parameters

showMetaMapFlow Parameters

Next Steps