Skip to main content

Platform SDKs

Platform SDKs are native Swift and Kotlin SDKs built on top of the Low Level SDK, the shared Rust core. They are what an iOS, macOS or Android team drops in to ship a VPN app, without writing its own glue around the generated bindings.

Apps call the Kape Platform SDK, which wraps the Low Level SDK, which calls the Kape REST API Apps call the Kape Platform SDK, which wraps the Low Level SDK, which calls the Kape REST API

Apps talk only to the Platform SDK. It calls the Low Level SDK for everything account and server related, and owns the OS-specific parts itself.

What it adds on top of the Low Level SDK​

AreaWhat you get
Native APIsasync/await and Combine on Apple, coroutines and Flow on Android. Low Level SDK errors arrive as one KapeError type instead of one exception type per Rust crate.
Platform integrationOIDC login with PKCE through the system browser, secure storage (Keychain on Apple, Keystore-encrypted DataStore on Android), subscription selection, and subscriptions that refresh when the app returns to the foreground.
The VPN tunnelThe Low Level SDK supplies locations, endpoints and credentials. The Platform SDK runs the WireGuard, Lightway or OpenVPN tunnel inside the OS VPN extension, with kill switch, split tunnelling, on-demand rules, custom DNS, IPv6 leak prevention, Dedicated IP and connection analytics.
Modular packagingOn Apple, each target adds only the products it needs. On Android, one artifact bundles every module. On both, location discovery also ships on its own, for integrations that don't run the tunnel.
One product, two platformsSame concepts and API shape on both (KapeSdkHandle, KapeAuthClient, VPN manager), released together under one version.

Modules​

On Android, the kape-platform-sdk artifact contains every module below; see Installation.

Used by the app​

iOS / macOSAndroidWhat it does
KapeCoreKapeCoreThe entry point. KapeSdkHandle owns the Low Level SDK instance and the active subscription. Also covers configuration, secure storage, logging, and mapping Low Level SDK errors to KapeError. Every other module builds on it.
KapeAuthKapeAuthSign-in and session handling: OIDC login with PKCE through the system browser, guest login, logout, auth state and the user's subscriptions.
KapeVPNKapeVPNThe VPN API the app talks to. KapeVPNManager (Android: KapeVpnManager) connects and disconnects, publishes status, and holds protocol and network protection settings. Ships the ready-made tunnel: on Apple you subclass KapePacketTunnelProvider in your Network Extension, on Android KapeVpnService is registered for you. Pulls in all the tunnel modules.
KapeVPNDiscoveryKapeVPN-DiscoveryServer locations, Smart Locations, and complete OpenVPN endpoint configs with credentials; on Apple also ping and geo lookup. Depends on KapeCore only, so an integration that just needs server lists or .ovpn configs ships no tunnel libraries.

Used by the tunnel​

iOS / macOSAndroidWhat it does
KapeVPN-PacketTunnelKapeVPN-VpnServiceThe tunnel core that runs inside the OS VPN process: session lifecycle, reconnects and routing. It has no Low Level SDK dependency, which keeps the tunnel process light and lets you plug in your own endpoint source.
KapeVPN-Lightway
KapeVPN-OpenVPN
KapeVPN-Lightway
KapeVPN-OpenVPN
KapeVPN-Wireguard
One adapter per tunnel protocol, each wrapping that protocol's native library. KapeVPN includes them automatically. On Apple, WireGuard lives inside KapeVPN-PacketTunnel.

Optional​

iOS / macOSAndroidWhat it does
KapeUIComponents (iOS only)—A ready-made in-app log viewer for debugging.

Get started​

PlatformLanguageGuide
iOS / macOSSwiftiOS SDK
AndroidKotlinAndroid SDK