The XignSys SDK is provided via private repositories owned the XignSys GmbH. If you are missing some credentials (or access rights) mentioned in the following chapters, please contact us. The following two chapters explain how the XignSys SDK can be made available for your app on Android or iOS platform.
The XignSys iOS SDK is provided via the XignSys GitLab from the
project XignSysIosSdk. The project contains
a Package.swift and therefore can be added as Swift Package Manager dependency to your project with on of the
following URL:
Note: The ssh link requires you to add an ssh key to your XignSys GitLab account. You can do that under https://gitlab.xign.de/-/profile/keys.
The versions of the SDK are managed via GitLab tags. Please use exact version matching while importing the SDK, because even minor version update could affect the compatibility.
Note: Even though the project contains a
.podspecfile, you should not import the SDK as CocoaPod. The podspec is currently not maintained. If you wish to import the SDK as CocoaPod please contact us, so we can update the file.
After adding the dependency you need to make some small changes to your application's target, if not already present.
First, the XignSys SDK needs the capability DataProtection to securely store data. Second, if you wish to use the
biometric authentication feature, you need to specify the key NSFaceIDUsageDescription along with a description on why
it is used in your app's info.plist, e.g. "Your Face ID is used to achieve a higher level of security during
authentication". This is necessary because Apple requires the app to get the permission from the end user on whether it
is allowed to use FaceID or not.
Furthermore, the XignSys SDK checks if the operating system is jailbroken or not. A part of this evaluation process is
to check whether known apps that need root access are installed on the device. This is done by using
the canOpenURL(_:) method and requires the following URLs to be listed in the apps info.plist:
XML
<?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>LSApplicationQueriesSchemes</key>
<array>
<string>cydia</string>
<string>undecimus</string>
<string>sileo</string>
<string>zbra</string>
<string>filza</string>
<string>activator</string>
</array>
</dict>
</plist>
Finally, the XignSys SDK can be used by importing the module XignSysSdk in your Swift files.
For the Android platform the XignSys SDK is provided via a private maven repository. To add the dependency to your build script follow these steps.
Note: The instructions are written for Kotlin DSL Gradle build files. If you have Groovy DSL build files, please refer to the Android build script documentation or Gradle documentation to help you with the syntactical differences.
In your root build.gradle.kts or build.gradle add the XignSys private maven repository to the list of repositories
(remember to fill in your username and password):
Kotlin
allprojects {
repositories {
maven {
url = uri("https://nexus.xign.de/repository/maven-sdk-external/")
credentials {
username = ""
password = ""
}
}
}
}
The SDK is split into two aar, one targeting Android API level 23 and one for 24 and upwards. If you are only
targeting Android API level 24 or higher you can just add the min24 dependency to your application build file
build.gradle.kts or build.gradle, e.g. like this:
Kotlin
dependencies {
// XignSys SDK
implementation("com.xignsys:android-sdk-min24:4.3.0")
}
Otherwise, if you wish to support Android API level 23 you need at least two product flavors targeting the distinct API levels. The following example shows an extract of a configuration with only the necessary changes:
Kotlin
android {
defaultConfig {
// the minimal supported Android SDK level of the app
minSdk = 23
// enable multidex support for older API levels
multiDexEnabled = true
// ...
// the rest of your configuration
}
compileOptions {
// enables java 1.8 desugaring for API levels < 26
isCoreLibraryDesugaringEnabled = true
// sets the source code compatibility to Java 1.8
sourceCompatibility = JavaVersion.VERSION_1_8
// sets the target compatibility to Java 1.8
targetCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions.apply {
// instructs the Kotlin compiler to generate Java 1.8 code
jvmTarget = "1.8"
// the Kotlin language version you wish to use
languageVersion = "1.5"
}
// defines a name for the API level flavor, you can choose this freely
val apiFlavor = "api"
// add the apiFlavor definition to the dimensions, you can have multiple at this point
flavorDimensions.add(apiFlavor)
productFlavors {
// creates a flavor configuration for API level 23. The name can be chosen freely, but it
// does affect the dependency import statement.
create("max23") {
// Adds the configuration to our "apiFlavor" definition.
dimension = apiFlavor
// Sets the target Android SDK level to 23
targetSdk = 23
// sets the max Android SDK level to 23
maxSdk = 23
}
// creates a second flavor configuration for API level 24 and upwards.
create("min24") {
// Adds the configuration to our "apiFlavor" definition.
dimension = apiFlavor
// sets the min Android SDK level to 24. The "targetSdkVersion" is missing here,
// because it is derived from the "defaultConfig" scope.
minSdk = 24
}
}
}
Now that the two API flavors max23 and min24 have been added to the android configuration, the SDK dependencies can
be added as follows:
Kotlin
dependencies {
// XignSys SDK
val xignVersion = "4.3.0"
"max23Implementation"("com.xignsys:android-sdk-max23:$xignVersion")
"min24Implementation"("com.xignsys:android-sdk-min24:$xignVersion")
}
Note: Please remember the name of the flavor implementation function, e.g.
max23Implementation, depends on your configured flavor dimensions and build variants. Take a look at configure build variants for a more detailed explanation.