**Early access, not yet published; use the OpenTelemetry route for production.** Package coordinates below describe planned releases. For the supported integration, follow [standard OpenTelemetry SDK setup](https://epok.cloud/docs/install/mobile-otel).

# Mobile session replay

Updated Nov 22, 2026 · today

Early access: Android epok-android 0.2.1 and iOS epok-ios 0.1.0. Validation is limited to emulator work on Android; the documented iOS test target is a simulator, with its run unverified in the repository. See [mobile SDK status](https://epok.cloud/docs#mobile-sdk-status).

The Epok replay libraries record your Android and iOS screens as masked wireframes and send them only to Epok. You watch them in the same replay player as browser sessions. Capture uses PostHog's open-source mobile recorder (MIT), pinned to one tested version and configured so that nothing reaches PostHog.

## What is recorded

- Wireframes of your views: layout, text, and touches. No screenshots and no video.
- Text inputs and images are masked by default. A typed value is stored only as asterisks.
- Logs, network bodies, and analytics events are not captured.
- Nothing is recorded or sent until your app grants consent. Withdrawal stops capture and erases anything still queued on the device.

## Android

Android 8.0 (API 26) or later. The library pins posthog-android 3.72.3; if your app already uses a different PostHog version, Gradle reports the conflict at build time.

```
// settings.gradle.kts
dependencyResolutionManagement {
    repositories {
        google()
        mavenCentral()
        maven("https://jitpack.io")
    }
}

// app/build.gradle.kts
dependencies {
    implementation("com.github.epok-cloud.epok-android:epok-replay:0.2.1")
}
```

```
import dev.epok.replay.EpokReplay
import dev.epok.replay.EpokReplayConfig

class App : Application() {
    lateinit var replay: EpokReplay

    override fun onCreate() {
        super.onCreate()
        // Starts denied; purges old queued replay. No capture or network until grant.
        replay = EpokReplay(this, EpokReplayConfig(
            ingestKey = "epk_…",                      // restricted ingest-only key
            endpoint = "https://ingest.epok.cloud",
        ))
    }
}

// From your consent UI, on a background thread (setup does disk I/O):
app.replay.grant()     // start masked wireframe capture
app.replay.withdraw()  // stop capture and erase anything still queued
```

Use replay together with [Android RUM](https://epok.cloud/docs/install/android-rum) for app starts, screens, network traces and errors. The libraries have separate consent APIs: connect both to your app's policy. Replay starts denied on every launch; RUM persists its consent choice. Serialize replay consent calls on a background thread.

## iOS

iOS 15 or later, Swift Package Manager. The package pins posthog-ios 3.92.0. Use your Epok tenant ID as accountId; the server identifies your tenant from the key.

```
// Xcode: File > Add Package Dependencies…, or in Package.swift:
.package(url: "https://github.com/epok-cloud/epok-ios.git", exact: "0.1.0"),
// target dependencies:
.product(name: "EpokRum", package: "epok-ios"),
.product(name: "EpokReplay", package: "epok-ios"),
```

```
import EpokRum
import EpokReplay

// On launch: creates no PostHog SDK, no files, and sends nothing yet:
let rum = try Rum(config: RumConfig(
    endpoint: "https://ingest.epok.cloud",
    publicIngestKey: "epk_…",            // restricted ingest-only key
    accountId: "YOUR_TENANT_ID", projectId: "0",
    serviceName: "my-ios-app"))
let replay = try EpokReplay(rum: rum,
    host: URL(string: "https://ingest.epok.cloud/v1/rum/mobile/ios")!,
    publicIngestKey: "epk_…")

// From your consent UI (on the main actor):
await replay.grantConsent()     // grants RUM consent too, then starts capture
await replay.withdrawConsent()  // stop capture and erase anything still queued
```

## Source and license

The early-access source uses Apache-2.0. Planned package destinations: [epok-android](https://github.com/epok-cloud/epok-android) (planned JitPack distribution) and [epok-ios](https://github.com/epok-cloud/epok-ios) (planned Swift Package Manager distribution). Packages are not yet published. Contact us for early-access validation; use standard OpenTelemetry for production telemetry.

## Check the integration

1. Use a restricted ingest-only key. The key ships inside your app, so treat it as public.
2. Before consent, confirm the app makes no request to ingest.epok.cloud.
3. Grant consent, use the app for a minute, then open Replay in Epok and filter by Android or iOS. A new session appears within a few minutes.
4. Type into a text field and check that the replay shows only asterisks.
5. Withdraw consent and confirm that no further uploads occur.

For mobile traces, errors, and metrics, see [mobile OpenTelemetry](https://epok.cloud/docs/install/mobile-otel). For browsers, see [browser RUM & replay](https://epok.cloud/docs/install/rum).
