CocoaPods¶
The CaptureSDK is released as a CocoaPods package.
iOS 13.0
(as of July 2024)The CaptureSDK for iOS supports both Swift and Objective C.
Take a look at this official guide to install or update CocoaPods on your machine before continuing.
Generating a Podfile¶
If your project already uses cocoapods, you can skip the following steps and move to the “Adding CaptureSDK to Podfile” section:
Open a terminal window and navigate to the directory of your project
Run this command in the terminal:
pod init
This will generate a new file called
Podfile
. Open this file by typingopen Podfile
in your terminal. (Or simply open from the Finder window)
Adding CaptureSDK to Podfile¶
Add this line to your Podfile:
pod 'CaptureSDK', '~> 1.9'
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '13.0'
target 'MyApp'
pod 'CaptureSDK', '~> 1.9'
Installing the CaptureSDK¶
Once you have added the pod name to your Podfile, you will need to install the SDK.
Save your changes/additions to the Podfile. You can safely close it now.
Go back to your terminal window and run this command:
pod install --repo-update
This will install the CaptureSDK within your project.
Once this completes, a new file will be generated called:
{Name_Of_Your_Project}.xcworkspace
If you had the
.xcodeproj
open during this time, please close it and open this newly created.xcworkspace
instead.