Skip to main content

Installation

Android

Requirements

Before integrating Cycurid SDK into your project, make sure you have the following requirements:

  • Android Studio

  • Minimum Target

    • Android Gradle Plugin Version: 7.4.1
    • Gradle Version: 7.5
    • minSDKVersion: 23
    • compileSDKVersion: 33

Installing With Gradle using GitHub Maven Package

  1. Make sure the following are included in the gradle.properties file
    android.useAndroidX=true
android.enableJetifier=true

Android Initialization

  1. In the project build.gradle, inside repositories, add the following inside :
    repositories {
google()
mavenCentral()
gradlePluginPortal()
}
  1. In the app build.gradle, add the dependency:
 implementation 'com.library.cycurid:cycuridsdk:1.0.21'

iOS

Requirements

Before integrating Cycurid SDK into your project, make sure you have the following requirements:

  • Xcode: You need the latest stable version of Xcode.

  • Minimum Target: Your project should have a minimum target of iOS 13.0.

iOS Setup Permissions

  • Inside the ios folder there is a folder named Runner open that and inside the info.plist add :

  • The provided code snippet can be added anywhere between the dict tags in the info.plist file.

    <key>com.apple.developer.nfc.readersession.iso7816.select-identifiers</key>
<array>
<string>com.apple.developer.nfc.readersession.iso7816.select-identifiers</string>
<string>A0000002471001</string>
</array>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>NSCameraUsageDescription</key>
<string>We only collect facemap binary data. This data is only use to re-authenticate when they try to login to the app. It&apos;s like a password. But this data changes every time the user logs in</string>
  • Example info.plist :

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    <key>UIApplicationSceneManifest</key>
    <dict>
    <key>UIApplicationSupportsMultipleScenes</key>
    <false/>
    <key>UISceneConfigurations</key>
    <dict>
    <key>UIWindowSceneSessionRoleApplication</key>
    <array>
    <dict>
    <key>UISceneConfigurationName</key>
    <string>Default Configuration</string>
    <key>UISceneDelegateClassName</key>
    <string>$(PRODUCT_MODULE_NAME).SceneDelegate</string>
    <key>UISceneStoryboardFile</key>
    <string>Main</string>
    <key>com.apple.developer.nfc.readersession.iso7816.select-identifiers</key>
    <array>
    <string>com.apple.developer.nfc.readersession.iso7816.select-identifiers</string>
    <string>A0000002471001</string>
    </array>
    <key>NSAppTransportSecurity</key>
    <dict>
    <key>NSAllowsArbitraryLoads</key>
    <true/>
    </dict>
    <key>NSCameraUsageDescription</key>
    <string>We only collect facemap binary data. This data is only use to re-authenticate when they try to login to the app. It&apos;s like a password. But this data changes every time the user logs in</string>
    </dict>
    </array>
    </dict>
    </dict>
    </dict>
    </plist>

iOS Initialization

Install using Cocoapods

pod init

Add the following to your Podfile.

pod 'CycuridSDK', '0.0.3', :source => "git@github.com:Cycurid/ios-cycurid-sdk.git"

Install the package using:

pod install

Flutter

Requirements

Before integrating Cycurid SDK into your project, make sure you have the following requirements:

  • Flutter: You need the latest stable version of Flutter.

Flutter Initialization

In the flutter App navigate to the pubspec.yaml file. Append the dependencies section with the following:

flutter_cycurid:
git:
url: git.com:Cycurid/flutter-cycurid-sdk.git
ref: main

example:

dependencies:
flutter:
sdk: flutter
flutter_cycurid:
git:
url: git.com:Cycurid/flutter-cycurid-sdk.git
ref: main

Install the package

Run flutter pub get in terminal

flutter pub get

Setting Up iOS Project

Follow these steps to configure your iOS project:

iOS Setup Permissions

  • Inside the ios folder there is a folder named Runner open that and inside the info.plist add :

  • The provided code snippet can be added anywhere between the dict tags in the info.plist file.

    <key>com.apple.developer.nfc.readersession.iso7816.select-identifiers</key>
<array>
<string>com.apple.developer.nfc.readersession.iso7816.select-identifiers</string>
<string>A0000002471001</string>
</array>
<key>NSCameraUsageDescription</key>
<string>We only collect facemap binary data. This data is only use to re-authenticate when they try to login to the app. It&apos;s like a password. But this data changes every time the user logs in</string>
  • Example info.plist :
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    <key>CFBundleDevelopmentRegion</key>
    <string>$(DEVELOPMENT_LANGUAGE)</string>
    <key>CFBundleDisplayName</key>
    <string>Flutter Application 1</string>
    <key>CFBundleExecutable</key>
    <string>$(EXECUTABLE_NAME)</string>
    <key>CFBundleIdentifier</key>
    <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
    <key>CFBundleInfoDictionaryVersion</key>
    <string>6.0</string>
    <key>CFBundleName</key>
    <string>flutter_application_1</string>
    <key>CFBundlePackageType</key>
    <string>APPL</string>
    <key>CFBundleShortVersionString</key>
    <string>$(FLUTTER_BUILD_NAME)</string>
    <key>CFBundleSignature</key>
    <string>????</string>
    <key>CFBundleVersion</key>
    <string>$(FLUTTER_BUILD_NUMBER)</string>
    <key>LSRequiresIPhoneOS</key>
    <true/>
    <key>UILaunchStoryboardName</key>
    <string>LaunchScreen</string>
    <key>UIMainStoryboardFile</key>
    <string>Main</string>
    <key>UISupportedInterfaceOrientations</key>
    <array>
    <string>UIInterfaceOrientationPortrait</string>
    <string>UIInterfaceOrientationLandscapeLeft</string>
    <string>UIInterfaceOrientationLandscapeRight</string>
    </array>
    <key>UISupportedInterfaceOrientations~ipad</key>
    <array>
    <string>UIInterfaceOrientationPortrait</string>
    <string>UIInterfaceOrientationPortraitUpsideDown</string>
    <string>UIInterfaceOrientationLandscapeLeft</string>
    <string>UIInterfaceOrientationLandscapeRight</string>
    </array>
    <key>CADisableMinimumFrameDurationOnPhone</key>
    <true/>
    <key>UIApplicationSupportsIndirectInputEvents</key>
    <true/>
    <key>com.apple.developer.nfc.readersession.iso7816.select-identifiers</key>
    <array>
    <string>com.apple.developer.nfc.readersession.iso7816.select-identifiers</string>
    <string>A0000002471001</string>
    </array>
    <key>NSCameraUsageDescription</key>
    <string>We only collect facemap binary data. This data is only use to re-authenticate when they try to login to the app. It&apos;s like a password. But this data changes every time the user logs in</string>
    </dict>
    </plist>

Install iOS dependencies:

Build the ios to generate a Podfile.

flutter build ios

Once you run flutter build ios a Podfile and Podfile.lock will be created for you in the ios directory.

cd ios;
pod install;

Setting Up Android Project

Follow these steps to configure your Android project:

Update Settings and Mainifest

Before integrating Cycurid SDK into your project, make sure you have the following requirements:

  • Inside android folder navigate to Settings.gradle (Project Settings), update "org.jetbrains.kotlin.android" version from "1.7.10" to "1.9.0"

  • In the app folder Update Build.gradle (app) under defaultConfig change:

    • minSdkVersion 23//flutter.minSdkVersion
    • targetSdkVersion 33//flutter.targetSdkVersion
     defaultConfig {
    applicationId "com.example.test_sdk_flutter"
    minSdkVersion 23//flutter.minSdkVersion
    targetSdkVersion 33//flutter.targetSdkVersion
    versionCode flutterVersionCode.toInteger()
    versionName flutterVersionName
    }
  • Inside main AndroidManifest.xml add

  1. xmlns:tools="http://schemas.android.com/tools" to the manifest tag
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
  1. add tools:replace="android:label to the application tag
 <application
android:label="flutter_example"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher"
tools:replace="android:label" >

React Native

Requirements

Before integrating Cycurid SDK into your project, make sure you have the following requirements:

  • React Native: Current release built using react native 0.76.5
  • NOTE: The SDK interacts with native code not currently supported by Expo

Install the package

In the root of the project in terminal, run the following command:

npm install react-native-cycurid-sdk

or

yarn add react-native-cycurid-sdk

Setting Up iOS Project

Follow these steps to configure your iOS project:

cd ios;
pod install;

iOS Setup Permissions

  • Inside the ios folder, open the [APPNAME] folder and update the info.plist:

  • The provided code snippet can be added anywhere between the dict tags in the info.plist file.

    <key>NFCReaderUsageDescription</key>
<string>Access is required to scan NFC tags for reading data.</string>
<key>com.apple.developer.nfc.readersession.iso7816.select-identifiers</key>
<array>
<string>com.apple.developer.nfc.readersession.iso7816.select-identifiers</string>
<string>A0000002471001</string>
</array>
<key>NSCameraUsageDescription</key>
<string>We only collect facemap binary data. This data is only use to re-authenticate when they try to login to the app. It&apos;s like a password. But this data changes every time the user logs in</string>
  • Example info.plist :
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    <key>CFBundleDevelopmentRegion</key>
    <string>$(DEVELOPMENT_LANGUAGE)</string>
    <key>CFBundleDisplayName</key>
    <string>Flutter Application 1</string>
    <key>CFBundleExecutable</key>
    <string>$(EXECUTABLE_NAME)</string>
    <key>CFBundleIdentifier</key>
    <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
    <key>CFBundleInfoDictionaryVersion</key>
    <string>6.0</string>
    <key>CFBundleName</key>
    <string>flutter_application_1</string>
    <key>CFBundlePackageType</key>
    <string>APPL</string>
    <key>CFBundleShortVersionString</key>
    <string>$(FLUTTER_BUILD_NAME)</string>
    <key>CFBundleSignature</key>
    <string>????</string>
    <key>CFBundleVersion</key>
    <string>$(FLUTTER_BUILD_NUMBER)</string>
    <key>LSRequiresIPhoneOS</key>
    <true/>
    <key>UILaunchStoryboardName</key>
    <string>LaunchScreen</string>
    <key>UIMainStoryboardFile</key>
    <string>Main</string>
    <key>UISupportedInterfaceOrientations</key>
    <array>
    <string>UIInterfaceOrientationPortrait</string>
    <string>UIInterfaceOrientationLandscapeLeft</string>
    <string>UIInterfaceOrientationLandscapeRight</string>
    </array>
    <key>UISupportedInterfaceOrientations~ipad</key>
    <array>
    <string>UIInterfaceOrientationPortrait</string>
    <string>UIInterfaceOrientationPortraitUpsideDown</string>
    <string>UIInterfaceOrientationLandscapeLeft</string>
    <string>UIInterfaceOrientationLandscapeRight</string>
    </array>
    <key>CADisableMinimumFrameDurationOnPhone</key>
    <true/>
    <key>UIApplicationSupportsIndirectInputEvents</key>
    <true/>
    <key>NFCReaderUsageDescription</key>
    <string>Access is required to scan NFC tags for reading data.</string>
    <key>com.apple.developer.nfc.readersession.iso7816.select-identifiers</key>
    <array>
    <string>com.apple.developer.nfc.readersession.iso7816.select-identifiers</string>
    <string>A0000002471001</string>
    </array>
    <key>NSCameraUsageDescription</key>
    <string>We only collect facemap binary data. This data is only use to re-authenticate when they try to login to the app. It&apos;s like a password. But this data changes every time the user logs in</string>
    </dict>
    </plist>

iOS Add NFC Capability

In Xcode you need will need to add the Near Field Communication Tag Reading capability under your projects signing and capabilities.

Setting Up Android Project

Follow these steps to configure your Android project:

Update Settings

Before integrating Cycurid SDK into your project, make sure you have the following requirements:

  • In the app folder Update Build.gradle (app) add:

    repositories {
    maven {
    name = "GitHubPackages"
    url = uri("https://maven.pkg.github.com/Cycurid/android-cycurid-sdk")
    credentials {
    username = "github_username"
    password = "personal access token"
    }
    }
    mavenCentral()
    google()
    }

Update the username and password to your github credentials. For generating a personal access token. Generate a GitHub token, if not one already, in order to access GitHub Maven GitHubPackages

  • Go to GitHub -> Settings -> Developer Settings -> Personal Access Tokens

  • For More Info on setting up personal tokens

  • Add the following inside the dependencies inside the same app build.gradle file

    implementation "androidx.lifecycle:lifecycle-viewmodel:2.5.1"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1"

configurations.all {
resolutionStrategy {
force 'androidx.lifecycle:lifecycle-viewmodel:2.5.1'
force 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1'
}
}

Ex:


dependencies {
// The version of react-native is set by the React Native Gradle Plugin
implementation("com.facebook.react:react-android")
implementation "androidx.lifecycle:lifecycle-viewmodel:2.5.1"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1"

configurations.all {
resolutionStrategy {
force 'androidx.lifecycle:lifecycle-viewmodel:2.5.1'
force 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1'
}
}

if (hermesEnabled.toBoolean()) {
implementation("com.facebook.react:hermes-android")
} else {
implementation jscFlavor
}
}
  • Inside main AndroidManifest.xml update
android:allowBackup="false" to android:allowBackup="true"
  1. Inside gradle.properties add the following line:
android.enableJetifier=true