Favicon

You are here: Home > App Distribution > SDK

Applivery SDK: Integrate App Distribution and User Management

Integrate app distribution and user management directly into your applications with the Applivery SDK. Deliver in-app updates and manage users easily.

The Applivery SDK is a lightweight library for iOS and Android that adds over-the-air update management, forced update enforcement, feedback reporting, and user binding directly into your App. It is designed for internal and beta distribution Builds — not for App Store or Google Play production releases.

The SDK integrates with just a few lines of code and requires no Applivery account registration from your end users.

Note

The SDK always updates to the most recent build available for the App, matching only the bundle ID or package name. It does not respect Publication filters, groups, or audiences — since the Publication from which a Build was originally downloaded cannot be identified at update time. If you need per-flavor or per-feature update isolation, create a separate Applivery app for each variant with a single Publication each.


Features

OTA Automatic Updates
Notifies users when a new version is available and lets them install it with a single tap.
Forced Updates
Blocks app usage and forces an update when the installed version falls below a minimum version threshold configured in the Applivery dashboard.
Feedback & Bug Reporting
Users can report bugs or send feedback by taking a screenshot or recording a video. Device information is automatically attached.
User Binding
Associate your own authenticated users with Applivery sessions for analytics, download tracking, and feedback attribution.

Current version: 4.5.0
Minimum iOS version: 15.0
Language: Swift
Distribution: Swift Package Manager (recommended), CocoaPods (deprecated)

Installation

In Xcode, go to File → Add Package Dependencies and enter:

https://github.com/applivery/applivery-ios-sdk.git

Set the dependency rule to Up to next major version (4.0.0 < 5.0.0).

You will be prompted to choose between two targets:

Target

When to use

Applivery

Use when the App is strictly internal and will never be submitted to the App Store. Static framework.

AppliveryDynamic

Use when you distribute internally via Applivery but also submit to the App Store. The framework can be excluded at build time for App Store schemes.

Note

App Store submissions: Including the Applivery SDK in an App Store build is not permitted and your submission may be rejected. Use AppliveryDynamic and exclude it from your App Store build configuration — see Conditionally excluding the Applivery iOS SDK for step-by-step instructions.

CocoaPods (deprecated)

pod 'Applivery', '~> 4.5'

Setup

Initialize the SDK early in your App's lifecycle, typically in AppDelegate or SceneDelegate:

Swift

import Applivery

let applivery = AppliverySDK.shared
applivery.start(token: "YOUR_APP_TOKEN", tenant: "YOUR_TENANT")

Objective-C

@import Applivery;

AppliverySDK *applivery = [AppliverySDK shared];
[applivery startWithToken:@"YOUR_APP_TOKEN" tenant:@"YOUR_TENANT"];

The tenant parameter is optional. If omitted, the SDK uses the default Applivery host. Your App Token is available in App Settings → API Tokens in the Applivery dashboard.

Configuration

Pass an AppliveryConfiguration object to start() to customize SDK behavior:

Swift

import Applivery

let config = AppliveryConfiguration(
    postponedTimeFrames: [3600, 86400], // Delay options in seconds shown to users when an update is available
    enforceAuthentication: true          // Require user login before SDK usage
)

AppliverySDK.shared.start(
    token: "YOUR_APP_TOKEN",
    tenant: "YOUR_TENANT",
    configuration: config,
    skipUpdateCheck: false
)

Objective-C

NSArray<NSNumber *> *timeFrames = @[@3600, @86400];
AppliveryConfiguration *config = [[AppliveryConfiguration alloc]
    initWithPostponedTimeFramesNSNumber:timeFrames
    enforceAuthentication:YES];

Property

Type

Description

postponedTimeFrames

[TimeInterval]

Time intervals in seconds shown as "remind me later" options in the update dialog. Maximum 3 options.

enforceAuthentication

Bool

If true, users must log in to Applivery before the App can be used. Default: false.

Key API Methods

Method

Description

start(token:tenant:configuration:skipUpdateCheck:)

Initializes the SDK. Call once at app launch.

checkForUpdates(forceUpdate:)

Checks for a newer build and prompts the user to update. Pass forceUpdate: true to ignore any postponed delay.

isUpToDate() -> Bool

Returns true if the current build number matches the latest available. Does not respect Publication filters.

update(onDownload:)

Downloads and installs the latest Build immediately.

setCheckForUpdatesBackground(_ enabled: Bool)

Automatically checks for updates when the App returns from background.

feedbackEvent()

Presents the feedback UI programmatically (e.g., on shake gesture).

enableScreenshotFeedback() / disableScreenshotFeedback()

Enables or disables screenshot detection to trigger feedback.

bindUser(email:firstName:lastName:tags:onComplete:)

Associates a user identity with the current session for analytics and feedback tracking.

unbindUser(onComplete:)

Removes the currently bound user.

getUser(onSuccess:)

Returns the currently bound user's profile as a dictionary.

handleRedirectURL(url:)

Handles SAML authentication redirect URLs. Call from AppDelegate or SceneDelegate.

Customization

UI Colors

AppliverySDK.shared.palette = Palette(
    primaryColor: .orange,
    secondaryColor: .white,
    primaryFontColor: .white,
    secondaryFontColor: .black,
    screenshotBrushColor: .green
)

String Literals — localize or rebrand SDK messages:

AppliverySDK.shared.textLiterals = TextLiterals(
    appName: "MyApp",
    otaUpdateMessage: "A new version is available. Update now?",
    forceUpdateMessage: "This version is no longer supported. Please update to continue."
)

Logging

applivery.logLevel = .info // .none | .error | .info | .debug

Level

Recommended for

.none

Production (default)

.error

Development

.info

Testing the SDK integration

.debug

Debugging SDK requests and responses

Swift / Xcode Compatibility

SDK Version

Xcode

Swift

v4.0+

13.x+

5.x

v3.4

13.x

5.x

v3.2

12.x

5.x

v2.7.x

9.x – 10.x

4.0, 4.2

Current version: 4.8.0
Minimum Android version: Android 7.0 (API level 24)
Language: Kotlin
Distribution: Maven Central

Installation

Add the dependency to your App's build.gradle. The SDK is designed for non-production Builds:

// Use debugImplementation so Applivery only runs in debug/testing builds
debugImplementation("com.applivery:applivery-sdk:${latestVersion}")

No-op artifact for release Builds

To avoid a complex source set configuration for excluding the SDK from release Builds, use the no-op artifact. It exposes the same public API as the full SDK but does nothing at runtime:

releaseImplementation("com.applivery:applivery-sdk-no-op:${latestVersion}")

This lets you call Applivery SDK methods throughout your codebase without affecting release Builds.

Setup

Initialize the SDK in your Application.onCreate() method:

import com.applivery.android.sdk.Applivery
import com.applivery.android.sdk.start

class MyApplication : Application() {
    override fun onCreate() {
        super.onCreate()
        Applivery.start(APPLIVERY_TOKEN)
        // For private Applivery instances, also pass the tenant:
        // Applivery.start(APPLIVERY_TOKEN, TENANT)
    }
}
Note

For Java projects (version 4.0.0+), use the AppliveryInterop class to access SDK functionality.

Your App Token is available in App Settings → API Tokens in the Applivery dashboard.

Configuration

Pass a Configuration object to Applivery.start() to customize behavior:

val configuration = Configuration(
    postponeDurations = listOf(2.hours, 30.minutes, 5.minutes),
    enforceAuthentication = false,
    downloadAction = BuildDownloadAction.IMMEDIATE
)

Applivery.start(APPLIVERY_TOKEN, configuration = configuration)

Property

Type

Description

postponeDurations

List<Duration>

Options shown to users to postpone an available update. Maximum 3 options.

enforceAuthentication

Boolean

If true, users must log in before using the SDK. Default: false.

downloadAction

BuildDownloadAction

IMMEDIATE installs the update as soon as the download completes. DEFERRED shows a notification and lets the user decide when to install.

Update Management

// Check for updates manually
Applivery.getInstance().checkForUpdates()

// Automatically check when app returns from background
Applivery.getInstance().setCheckForUpdatesBackground(true)

// Download the latest update without installing immediately
val callback = object : DownloadLastUpdateCallback {
    override fun onSuccess(update: CachedAppUpdate) {
        update.install() // install when ready
    }
    override fun onError(error: Throwable) { /* handle error */ }
}
Applivery.getInstance().downloadLastUpdate(callback)

// Enable background auto-download
Applivery.getInstance().enableDownloadLastUpdateBackground(callback)

// Trigger immediate download + install (follows configured downloadAction)
Applivery.getInstance().update()
Warning

enableDownloadLastUpdateBackground and setCheckForUpdatesBackground are mutually exclusive. Enabling one disables the other.

Feedback

// Enable/disable screenshot-triggered feedback
Applivery.getInstance().enableScreenshotFeedback()
Applivery.getInstance().disableScreenshotFeedback()

// Show feedback UI programmatically
Applivery.getInstance().feedbackEvent()

User Management

// Bind a user for analytics and feedback tracking
Applivery.getInstance().bindUser(email, firstName, lastName, tags)

// Remove the bound user
Applivery.getInstance().unbindUser()

// Get current user
Applivery.getInstance().getUser(getUserCallback)

Required Permissions

The SDK requires the following runtime permissions. Request them in your App before the features that need them are used:

Permission

Used for

POST_NOTIFICATIONS

Showing notifications during update downloads and screen recording

READ_MEDIA_IMAGES

Screenshot detection for feedback (full access required on Android 14+)

SYSTEM_ALERT_WINDOW

Screen recording for feedback

UI Customization

Create a res/values/applivery.xml file to override default colors and strings:

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <color name="applivery_primary_color">#FF0241E3</color>
    <color name="applivery_accent_color">#FF0241E3</color>
    <color name="applivery_foreground_color">#FF010258</color>

    <string name="appliveryUpdateMsg">A new version is available. Update now?</string>
    <string name="appliveryMustUpdateAppLocked">This version is outdated. Please update to continue.</string>
</resources>

Learn about Applivery SDK users, including bound and temporal users, how to bind/unbind them, and authentication enforcement. Track app usage and feedback.

8 min read Cross-platform