Integration
For IOS Devices
Update Podfile
Since our SDK is an dynamic framework you have to update your Podfile for dynamic frameworks.
source "https://github.com/AmaniTechnologiesLtd/Mobile_SDK_Repo"
source "https://github.com/CocoaPods/Specs"
Building for devices that don’t support NFC
For not NFC supported device (like iPhone 6) there is no CoreNFC library in system and also we are using some ios crypto libraries for reading nfc data supported after iOS 13. You need to add below listed libraries as optional under Build Phases->Link Binary With Libraries menu. Even if you don't use the nfc process, you should add.
CoreNFC.framework
CryptoTokenKit.framework
CryptoKit.framework
For Android Devices
Dependencies
- Add the following dependencies to your Module build.gradle file.
implementation 'ai.amani:Android.SDK.UI:1.1.0'
- On your module’s
build.gradlefile under theandroid/app/build.graldeadd the changes below inside ofandroidsection.
packagingOptions {
pickFirst 'lib/x86/libc++_shared.so'
pickFirst 'lib/x86_64/libc++_shared.so'
pickFirst 'lib/armeabi-v7a/libc++_shared.so'
pickFirst 'lib/arm64-v8a/libc++_shared.so'
}
dataBinding { enabled true }
- Add the following in the Project build.gradle within in buildscript within the buildscript->allprojects.
allprojects {
repositories {
google()
mavenCentral()
maven { url "https://jfrog.amani.ai/artifactory/amani-sdk" }
maven { url "https://www.jitpack.io" }
}
}
ProGuard Rule Usage
- If you are using ProGuard in your application, you just need to add this line into your ProGuard Rules!
-keep class com.amani_ml** {*;}
-dontwarn com.amani.ml**
-keep class datamanager.** {*;}
-dontwarn datamanager.**
-keep class networkmanager.** {*;}
-dontwarn networkmanager.**
-keep class com.amani_ai.jniLibrary.CroppedResult { *; }
-keep class org.jmrtd.** { *; }
-keep class net.sf.scuba.** {*;}
-keep class org.bouncycastle.** {*;}
-keep class org.spongycastle.** {*;}
-keep class org.ejbca.** {*;}
-dontwarn org.ejbca.**
-dontwarn org.bouncycastle.**
-dontwarn org.spongycastle.**
-dontwarn org.jmrtd.**
-dontwarn net.sf.scuba.**
-keep class org.tensorflow.lite**{ *; }
-dontwarn org.tensorflow.lite.**
-keep class org.tensorflow.lite.support**{ *; }
-dontwarn org.tensorflow.lite.support**