Skip to main content

Installation

info
are required to process with the installation of the SDK.

Please ensure that you have access to Veryfi Lens SDK. If you haven't already obtained access, please refer to the

section for instructions.

info

The below steps assume that you already have Cocoapods installed and initialized in your project. If you're new to

, visit the official page.

1. Open your project's Podfile

2. Add the Veryfi private Cocoapods repository as a source at the top of the Podfile

Make sure that cocoapods spec repository is also specified as a source

source 'https://repo.veryfi.com/shared/lens/veryfi-lens-podspec.git'
source 'https://github.com/CocoaPods/Specs.git'

3. Add the VeryfiLens pod to your target

pod 'VeryfiLens'

3.1. (Optional) In case you're using static linkage in your pods:

Install cocoapods-pod-linkage plugin https://github.com/microsoft/cocoapods-pod-linkage

gem install "cocoapods-pod-linkage"

Import it in your Podfile

plugin 'cocoapods-pod-linkage'

Make sure to put use_framework! call inside your target

target 'MyTarget' do
use_frameworks! :linkage => :static

Lastly, import Veryfi lens pod like this

pod 'VeryfiLens', 'x.x.x.x', :linkage => :dynamic

4. A minimal version of your Podfile should look similar to this:

source 'https://repo.veryfi.com/shared/lens/veryfi-lens-podspec.git'
source 'https://github.com/CocoaPods/Specs.git'
target 'VeryfiLensExample' do
use_frameworks!
pod 'VeryfiLens'
end

5. Using Swift package manager

  • In Xcode go to File -> Add package dependencies and in the search field put the package url
https://repo.veryfi.com/shared/lens/veryfi-lens-spm.git
  • You'll be prompted to put Username and Password to download the package, you must use the same credentials created for cocoapods in Next step

6. Generate Veryfi Lens SDK Access Credentials to pull the Lens SDK from Veryfi's private repository.

6.1. Navigate to the Keys Section:
  • Sign in to the API Portal.
  • Navigate to the Keys section under the Settings Menu.
6.2. Choose a Platform:

Within the Keys, choose Lens: Cocoapods (iOS) section and click the "Add Access Key" button.

6.3. Fill in required information:

You will be prompted to provide the following information:

  • First and Last Name
  • Email Address
  • Create a Password

Upon providing the required information, your username will be generated.

In the documentation, the created cocoapods username and password will be referred to as COCOAPODS_USERNAME and COCOAPODS_PASSWORD. You can now use these credentials to access the privately stored SDK.

info

The password you create here will be used to access the SDK, and it won't be displayed in the Keys section again. Make sure to save it in a secure place.

For convenience and security, we recommend storing these access credentials using a Git Credential Storage. This will ensure that you are automatically logged in each time you install or update the Lens SDK.

  • Replace COCOAPODS_USERNAME and COCOAPODS_PASSWORD with corresponding credentials
git credential approve <<EOF
protocol=https
host=repo.veryfi.com
path=shared/lens/veryfi-lens-podspec.git
username=COCOAPODS_USERNAME
password=COCOAPODS_PASSWORD

EOF

7. Install Lens

Run the command in the Terminal, in the root folder of your project:

pod install