Skip to content

Commit e07dfff

Browse files
Update ComplyCube SDK to v0.0.6 and improve iOS setup docs
Upgraded the complycube dependency to version 0.0.6 in pubspec.yaml and pubspec.lock. Enhanced the README with detailed iOS CocoaPods setup instructions and required Info.plist permissions. Updated main.dart to streamline imports and add 'documentCapture' and 'faceCapture' steps to the verification flow.
1 parent eac8695 commit e07dfff

File tree

4 files changed

+73
-33
lines changed

4 files changed

+73
-33
lines changed

README.md

Lines changed: 66 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,42 +8,87 @@ This repository provides a pre-built UI that uses the ComplyCube SDK. It guides
88

99
### Installing Flutter dependencies
1010

11-
#### Add Repository Token for Dart
11+
### Install the SDK
1212

13-
1. To access the ComplyCube repository, you must add a repository token. Run the following command in your terminal:
13+
Install the Flutter library by running:
1414

15-
```bash
16-
dart pub token add "https://complycuberepo.jfrog.io/artifactory/api/pub/cc-pub-release-local"
15+
```sh
16+
flutter pub add complycube
1717
```
1818

19-
After executing the command, you will need to add the token provided by the jFrog repository.
19+
### CocoaPods
2020

21-
#### Install Dart packages
21+
1. Before using the ComplyCube SDK, install the CocoaPods plugin by running the following command in your terminal:
2222

23-
1. To install the required Dart packages, run the following command:
23+
```sh
24+
sudo gem install cocoapods
25+
```
2426

25-
```bash
26-
dart pub get
27-
```
27+
2. Open your `ios/Podfile` and add the following configuration:
2828

29-
### Install CocoaPods
29+
```ruby
30+
source 'https://github.com/CocoaPods/Specs.git'
3031
31-
1. Before using the ComplyCube SDK, install the CocoaPods Artifactory plugin by running the following command in your terminal:
32+
platform :iOS, '13.0'
3233
33-
```bash
34-
gem install cocoapods-art
35-
```
34+
target 'YourApp' do
35+
use_frameworks!
36+
use_modular_headers!
3637
37-
2. To add the library, copy your repository credentials into a `.netrc` file to your home directory and setup the repository:
38+
# Other existing pod configurations
3839
39-
```bash
40-
pod repo-art add cc-cocoapods-release-local "https://complycuberepo.jfrog.io/artifactory/api/pods/cc-cocoapods-release-local"
41-
```
40+
post_install do |installer|
41+
installer.pods_project.targets.each do |target|
42+
target.build_configurations.each do |build_configuration|
43+
build_configuration.build_settings['ENABLE_BITCODE'] = 'NO'
44+
build_configuration.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
45+
build_configuration.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.1'
46+
build_configuration.build_settings['ARCHS'] = ['$(ARCHS_STANDARD)', 'x86_64']
47+
build_configuration.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = ['arm64', 'arm64e', 'armv7', 'armv7s']
48+
build_configuration.build_settings['GENERATE_INFOPLIST_FILE'] = 'YES'
49+
end
50+
end
51+
end
52+
53+
$static_frameworks = [
54+
# pods that must be built statically
55+
]
56+
57+
pre_install do |installer|
58+
Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
59+
60+
installer.pod_targets.each do |target|
61+
if $static_frameworks.include?(target.name)
62+
puts "Overriding the static_framework method for #{target.name}"
63+
def target.build_type;
64+
Pod::BuildType.static_library
65+
end
66+
end
67+
end
68+
end
69+
end
70+
```
71+
72+
3. Save the `Podfile`.
73+
74+
4. Run `pod install` in your `ios` directory to install the pods and apply the configurations.
75+
76+
#### Application Permissions
4277
43-
### Add Artifactory Credentials for Gradle
78+
Our SDK uses the device camera and microphone for capture. You must add the following keys to your application's `ios/Info.plist` file.
4479
45-
1. In the `android/gradle.properties` file, replace `ARTIFACTORY_USER` and `ARTIFACTORY_PASSWORD` with your JFrog Username and the encrypted JFrog Password.
80+
1. `NSCameraUsageDescription`
81+
```xml
82+
<key>NSCameraUsageDescription</key>
83+
<string>Used to capture facial biometrics and documents</string>
84+
```
4685
86+
2. `NSMicrophoneUsageDescription`
87+
```xml
88+
<key>NSMicrophoneUsageDescription</key>
89+
<string>Used to capture video biometrics</string>
90+
```
91+
4792
### Run the apps
4893
4994
1. [Create a Client ID](https://docs.complycube.com/documentation/guides/mobile-sdk-guide/mobile-sdk-integration-guide#id-2.-create-a-client).

lib/main.dart

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
import 'dart:math';
2-
31
import 'package:flutter/material.dart';
4-
import 'dart:async';
5-
6-
import 'package:flutter/services.dart';
72
import 'package:complycube/complycube.dart';
83

94
void main() {
@@ -36,6 +31,10 @@ class _MyAppState extends State<MyApp> {
3631
"title": "XTM ID verification",
3732
"message": "We will now verify your identity.",
3833
},
34+
{
35+
"name": 'documentCapture',
36+
},
37+
'faceCapture',
3938
{
4039
"name": "customerInfo",
4140
"title": "CustomerInfo",
@@ -242,12 +241,8 @@ class _MyAppState extends State<MyApp> {
242241
"borderRadius": 16,
243242
}
244243
},
245-
//Handle callbacks
246244
onError: (errors) {
247245
print("CCube Errors:: ${errors.map((e) => e.toJson())}");
248-
// if (kDebugMode) {
249-
// print("CCube Errors:: ${errors.map((e) => e.toJson())}");
250-
// }
251246
},
252247
onSuccess: (result) {
253248
print("CCube Result:: ${result.toJson()}");

pubspec.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ packages:
4545
dependency: "direct main"
4646
description:
4747
name: complycube
48-
sha256: b9d93097b7d744581755a7c87c78ea67fe3420babf5ed014c23bdff3689e3446
48+
sha256: da13e2321f5e3a9da9031e751099daf04faab7b0e204d3ff26acba958df9bdc5
4949
url: "https://pub.dev"
5050
source: hosted
51-
version: "0.0.5"
51+
version: "0.0.6"
5252
cupertino_icons:
5353
dependency: "direct main"
5454
description:

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ environment:
1616
dependencies:
1717
flutter:
1818
sdk: flutter
19-
complycube: ^0.0.5
19+
complycube: ^0.0.6
2020

2121
# When depending on this package from a real application you should use:
2222
# complycube: ^x.y.z

0 commit comments

Comments
 (0)