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 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
| Area | What you get |
|---|---|
| Native APIs | async/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 integration | OIDC 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 tunnel | The 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 packaging | On 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 platforms | Same 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 / macOS | Android | What it does |
|---|---|---|
KapeCore | KapeCore | The 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. |
KapeAuth | KapeAuth | Sign-in and session handling: OIDC login with PKCE through the system browser, guest login, logout, auth state and the user's subscriptions. |
KapeVPN | KapeVPN | The 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. |
KapeVPNDiscovery | KapeVPN-Discovery | Server 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 / macOS | Android | What it does |
|---|---|---|
KapeVPN-PacketTunnel | KapeVPN-VpnService | The 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-LightwayKapeVPN-OpenVPN | KapeVPN-LightwayKapeVPN-OpenVPNKapeVPN-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 / macOS | Android | What it does |
|---|---|---|
KapeUIComponents (iOS only) | — | A ready-made in-app log viewer for debugging. |
Get started
| Platform | Language | Guide |
|---|---|---|
| iOS / macOS | Swift | iOS SDK |
| Android | Kotlin | Android SDK |