This repository contains UIKit and SwiftUI examples for the non-NFC ComplyCube Mobile SDK 2.1.0. Both examples use the check-driven integration and collect:
- an identity document (passport or a GB/FR national identity card)
- a biometric video selfie
- a proof-of-address document
The SDK supports iOS 13 and later. The included UIKit project currently targets iOS 15.2, and the SwiftUI project targets iOS 16.1.
You need:
- A Mac with Xcode installed.
- A real iPhone or iPad. A real device is recommended because the flow uses the camera and microphone.
- CocoaPods.
- A Client ID and a fresh SDK token supplied by your backend.
Never put a ComplyCube API key in an iOS app. Your backend must create the client and SDK token. Generate a new SDK token each time a verification flow starts, and make sure the token's appId matches the sample app's bundle identifier.
Open the Terminal app and run:
gem install cocoapodsIf your company uses Bundler, install and run CocoaPods through the repository's bundle instead.
Check the installation:
pod --versionAsk your backend engineer for:
CLIENT_ID: created with the Clients APISDK_TOKEN: generated with the SDK Tokens API
Tokens are short-lived and must not be reused. If the app reports an expired-token error, request a new token.
For production, replace the placeholders with a request to your backend. Direct replacement is only intended for locally testing these example apps.
-
In Terminal, move into the UIKit folder:
cd complycube-ios-sdk/UIKit -
Install the SDK:
pod install
-
Open
UIKit/SampleApp.xcworkspacein Xcode. Do not open the.xcodeprojfile. -
Open
SampleApp/ViewController.swiftand replaceCLIENT_IDandSDK_TOKENwith fresh values. -
In Xcode's left sidebar, select the blue SampleApp project, select the SampleApp target, then open Signing & Capabilities.
-
Select your Apple development team. If Xcode reports that the bundle identifier is unavailable, replace it with a unique value and ask your backend engineer to generate the SDK token using that same value as
appId. -
Connect and unlock your iPhone or iPad, select it from the device menu at the top of Xcode, and press the Run button (the triangle).
-
Tap Onboard Client in the app.
Completion, cancellation, and error details are printed in Xcode's debug console.
-
In Terminal, move into the SwiftUI folder:
cd complycube-ios-sdk/SwiftUI -
Install the SDK:
pod install
-
Open
SwiftUI/SampleApp.xcworkspacein Xcode. Do not open the.xcodeprojfile. -
Open
SampleApp/ContentView.swiftand replaceCLIENT_IDandSDK_TOKENwith fresh values. -
Select the SampleApp project and target, open Signing & Capabilities, and select your Apple development team.
-
If you change the bundle identifier, request a new SDK token whose
appIdmatches it. -
Connect and unlock your iPhone or iPad, select it in Xcode, and press Run.
-
Tap Start verification.
The current flow status appears in the app and full details are printed in Xcode's debug console.
If Xcode reports a missing LottieLoopMode.loop symbol, refresh the CocoaPods project and clear the previously built app:
- Close the project in Xcode.
- Run
pod installagain from the example'sUIKitorSwiftUIfolder. - Reopen the example's
.xcworkspacefile. - In Xcode, select Product > Clean Build Folder.
- Delete the existing SampleApp from the iPhone or iPad.
- Press Run in Xcode to install a fresh copy.
Both example Podfiles enable library evolution for all pod targets. This is required because ComplyCube Mobile SDK 2.1.0 is a precompiled framework and expects public symbols from Swift dependencies such as Lottie and JWTDecode at runtime.
Run this checklist for both examples:
- The app installs and opens without crashing.
- Starting verification opens the ComplyCube flow.
- The app asks for camera and microphone permission. Select Allow.
- The document screen offers Passport and national identity cards from GB and FR.
- Document capture or upload can be completed.
- The video-selfie stage records successfully.
- The proof-of-address stage accepts a document.
- Completing the flow produces a success result.
- Start again, close the flow, and confirm that cancellation is reported.
- Test with an expired or deliberately invalid SDK token and confirm that an error is reported rather than an app crash.
Use test identities and documents approved by ComplyCube. Do not use real customer data in a development environment unless your organisation has explicitly approved it.
For detailed instructions on integrating our SDK, please refer to our integration guide.
These examples deliberately use configurable SDK stages (the check-driven approach). For most production integrations, ComplyCube recommends the workflow integration, which keeps the verification journey centrally configured.
See the iOS SDK documentation, ComplyCube user guide, and API reference for production integration details.
ComplyCube provides identity verification, AML, and KYC services through APIs, SDKs, and hosted integration options.