Getting Started
Add the Anyline Tire Tread SDK as dependency
The Anyline Tire Tread SDK is available through Maven on Android, and through Swift Package Manager or CocoaPods on iOS. On iOS, Swift Package Manager is the recommended integration method.
-
Android
-
iOS
The Anyline Tire Tread SDK for Android is available through the maven registry: https://europe-maven.pkg.dev/anyline-ttr-sdk/maven.
To integrate it, add the Anyline Tire Tread SDK io.anyline.tiretread.sdk:shared as a dependency to your build.gradle, along with the compose compiler options.
repositories {
// ... your other repositories ...
mavenCentral()
// Anyline Maven registry
maven { url "https://europe-maven.pkg.dev/anyline-ttr-sdk/maven" }
}
android {
namespace 'your.apps.namespace'
compileSdk 35
defaultConfig {
minSdk 23
targetSdk 35
...
}
buildFeatures {
viewBinding true
compose = true
}
composeOptions {
kotlinCompilerExtensionVersion = "1.5.12"
}
}
dependencies {
// Anyline Tire Tread SDK dependency
implementation 'io.anyline.tiretread.sdk:shared:15.5.0'
//... your other dependencies
}
The Anyline Tire Tread SDK for iOS is available via Swift Package Manager and CocoaPods. Swift Package Manager is the recommended integration method.
Swift Package Manager
In Xcode, go to File → Add Package Dependencies and enter the framework’s repository URL: https://github.com/Anyline/anyline-tiretread-spm-module
Both channels ship the same SDK at the same version, so adopting Swift Package Manager is a packaging change and nothing more. There is no version jump, no API difference and no code to rewrite: if you are on 15.5.0 today, you stay on 15.5.0.
Swift Package Manager can be adopted alongside CocoaPods. Xcode supports both in one project, so CocoaPods continues to manage your workspace and every other pod, while Anyline arrives as a project-level package dependency.
In practice the change is: add one package, remove one line from your Podfile.
After adding the dependency, import the framework into your native iOS application with the following line:
import AnylineTireTreadSdk
CocoaPods
The Anyline Tire Tread SDK is published to CocoaPods through 1 December 2026. To use it, add the following line to your Podfile:
pod 'AnylineTireTreadSdk'
Run pod install in the terminal in the same directory as your Podfile.
1 December 2026 is the last day Anyline publishes a new Tire Tread SDK version to CocoaPods. It is the last day publishing is possible: on 2 December 2026 the CocoaPods Trunk service becomes read-only for every package, a change by the CocoaPods project rather than by Anyline.
What neither date means:
-
Neither is a date on which an existing build stops working.
-
Neither affects versions already published. Those stay installable indefinitely, the final release included, so your current builds keep resolving as they do today.
Moving to Swift Package Manager is how you receive SDK versions released after 1 December 2026, not something you need to do to avoid a breakage.
|
The Anyline Tire Tread SDK follows Semantic Versioning. |
Integrate the Anyline License Key
A License Key string is required in order to run the Anyline Tire Tread SDK in your app.
Store the License Key
You can integrate your license key string in a way that best suits your development workflow.
As the integrator, you are responsible for managing your license key securely within your application. We strongly recommend using platform-specific secure storage solutions such as the Keychain for iOS and the Keystore for Android. Alternatively, consider implementing Dynamic Delivery to retrieve the license key at runtime from a secure server.
Initialize the Tire Tread SDK with the License Key
Call AnylineTireTread.initialize() once before doing anything related to the SDK. The callback returns an SdkResult, so you handle Ok when the SDK is ready and Err when initialization fails.
-
Android
-
iOS
import io.anyline.tiretread.sdk.api.AnylineTireTread
import io.anyline.tiretread.sdk.api.SdkResult
AnylineTireTread.initialize(context = applicationContext, licenseKey = "<YOUR_LICENSE_KEY>") { result ->
when (result) {
is SdkResult.Ok -> { /* SDK is ready */ }
is SdkResult.Err -> { /* Handle result.error */ }
}
}
import AnylineTireTreadSdk
AnylineTireTread.shared.initialize(licenseKey: "<YOUR_LICENSE_KEY>") { result in
if result.isOk {
// SDK is ready
} else if let error = result.error {
// Handle error
}
}
This function attempts to initialize AnylineTireTread with the provided license key. If the SDK fails to initialize, handle the returned SdkError appropriately.
|
Call |
After initialization, you can read the SDK version at any time via AnylineTireTread.sdkVersion (Android) or AnylineTireTread.shared.sdkVersion (iOS).
InitOptions
initialize() accepts an optional InitOptions parameter:
| Field | Type | Description |
|---|---|---|
|
|
A custom identifier to tell apart different devices of the same model. Sent to the backend with each measurement. |
|
|
Identifies the wrapper platform (Cordova, Flutter, ReactNative, etc.) and its version. Only needed when building your own wrapper layer around the native SDK. |
|
|
Maximum time in milliseconds allowed per attempt when uploading a single captured image. Each image is tried up to 2 times (1 retry) internally. Raise for poor-connectivity fleets, lower to fail fast. Default: |
-
Android
-
iOS
AnylineTireTread.initialize(
context = applicationContext,
licenseKey = "<YOUR_LICENSE_KEY>",
options = InitOptions(customTag = "warehouse-device-04"),
) { result ->
when (result) {
is SdkResult.Ok -> { /* SDK is ready */ }
is SdkResult.Err -> { /* Handle result.error */ }
}
}
AnylineTireTread.shared.initialize(
licenseKey: "<YOUR_LICENSE_KEY>",
options: InitOptions(customTag: "warehouse-device-04")
) { result in
if result.isOk {
// SDK is ready
} else if let error = result.error {
// Handle error
}
}
Request the necessary permissions and features
Before starting the scan process, define the permissions required for the SDK to function correctly.
All permissions that require user interaction are handled in the SDK already. All that is left to do is add them:
-
Android
-
iOS
The Anyline Tire Tread SDK uses the camera for scanning the tires.
The Internet access permission is required at all times, whenever the SDK is called. To use the Haptic feedback, the Vibration permission should also be requested during compile time.
Here is the full list of permissions and features required by the Tire Tread SDK for Android:
-
Permissions
-
CAMERA -
INTERNET -
VIBRATE
-
-
Features
-
android.hardware.camera -
android.hardware.camera.flash -
android.hardware.camera.autofocus
-
Here is an example on how you can add them to your AndroidManifest.xml file:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<!-- declare camera, internet, and vibrate permission -->
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-feature android:name="android.hardware.camera" android:required="true" />
<uses-feature android:name="android.hardware.camera.autofocus" android:required="true" />
<uses-feature android:name="android.hardware.camera.flash" android:required="false" />
...
</manifest>
Add a NSCameraUsageDescription entry to your Info.plist:
<key>NSCameraUsageDescription</key>
<string>Camera access is needed to scan tire tread depth.</string>
Check Device Support
Before starting a scan, you can verify that the current device meets the hardware requirements of the Anyline Tire Tread SDK. This check can be called at any time — it does not require the SDK to be initialized first.
On Android, the check verifies that the device camera meets the hardware requirements for tire tread scanning. On iOS, the check verifies the minimum OS version.
-
Android
-
iOS
import io.anyline.tiretread.sdk.api.AnylineTireTread
import io.anyline.tiretread.sdk.api.SdkResult
// Pass your Activity (a ComponentActivity) so the SDK can request camera
// permission on your behalf if it has not been granted yet.
AnylineTireTread.isDeviceSupported(context = this) { result ->
when (result) {
is SdkResult.Ok -> {
if (result.result) {
// Device is supported — proceed with initialization
} else {
// Device does not meet hardware requirements
}
}
is SdkResult.Err -> {
// Check failed (e.g. camera permission not granted)
// Handle result.error
}
}
}
import AnylineTireTreadSdk
AnylineTireTread.shared.isDeviceSupported { result in
if result.isOk, let isSupported = result.result as? Bool {
if isSupported {
// Device is supported — proceed with initialization
} else {
// Device does not meet hardware requirements
}
} else if let error = result.error {
// Handle error
}
}
|
On Android, the device support check requires camera access. If the permission has not been granted yet, the SDK requests it for you — but only when you pass an Activity ( If the |