CocoaPods
Add the Vouch iOS SDK with CocoaPods.
Check the requirements before you start. You also need CocoaPods 1.10.0 or later.
Installation
If you're using CocoaPods for dependency management, you can integrate the Vouch iOS SDK as follows:
Step 1: Add the pod to your Podfile
platform :ios, '14.0'
target 'YourApp' do
use_frameworks!
pod 'vouch-ios-sdk'
endStep 2: Install the pod
pod installWithout a version in the Podfile, pod install picks the latest release and records it in Podfile.lock. To pin a version, see the releases page.
Step 3: Open the workspace
After installation, make sure to open the .xcworkspace file (not the .xcodeproj) to work with your project:
open YourApp.xcworkspaceImportant: Always use the .xcworkspace file after installing CocoaPods dependencies. Opening the .xcodeproj directly will result in missing dependencies.
Verification
After installation, verify the SDK is properly integrated by importing it in your Swift files:
import VouchSDKOr in Objective-C:
#import <VouchSDK/VouchSDK-Swift.h>If the import succeeds without errors, the SDK has been installed correctly. You can now proceed to the Usage Guide (Swift) or Usage Guide (Objective-C) to learn how to integrate verification flows into your application.
Last updated on