iOS v0.22.0 · Android v0.1.0
Drop AppMate into your iOS or Android app.
A Swift Package for iOS 16+ and a Kotlin library for Android 7.0+, with the same method names on both. Three calls and the cancel flow you built in the dashboard opens in an in-app sheet, captures the reason, and hands the user back to your app through a typed callback.
1 · Install
// Package.swift
dependencies: [
.package(
url: "https://github.com/fil-technology/appmate-ios",
from: "0.22.0"
)
]2 · Use
import AppMate
// Once at app start
RetentionFlow.configure(.init(
appSlug: "your-app-slug",
baseURL: URL(string: "https://cancel.appmate.cloud")!,
urlScheme: "myapp"
))
// When the user taps Cancel Subscription
RetentionFlow.startCancelFlow(userId: user.id) { link in
switch link.action {
case .manageSubscription:
Task { await RetentionFlow.presentManageSubscriptions() }
case .openOffer(let id): presentOffer(id)
case .openPremium(let id): presentPaywall(id)
case .openFeature(let id): route(to: id)
default: break
}
}1 · Install
// settings.gradle.kts → repositories
maven { url = uri("https://jitpack.io") }
// build.gradle.kts
implementation(
"com.github.fil-technology.appmate-android:appmate:0.1.0"
)2 · Use
import cloud.appmate.*
// Once, in Application.onCreate
RetentionFlow.configure(this, RetentionFlowConfig(
appSlug = "your-app-slug",
baseUrl = "https://cancel.appmate.cloud",
urlScheme = "myapp",
))
// When the user taps Cancel subscription
RetentionFlow.startCancelFlow(userId = user.id) { link ->
when (val action = link.action) {
RetentionFlowAction.ManageSubscription ->
RetentionFlow.presentManageSubscriptions()
is RetentionFlowAction.OpenOffer -> presentOffer(action.id)
is RetentionFlowAction.OpenPremium -> presentPaywall(action.paywallId)
is RetentionFlowAction.OpenFeature -> route(action.id)
else -> Unit
}
}Both SDKs parse the same deep-link contract, so one dashboard config drives both apps.