iOS SDK
info
The iOS Platform SDK is in early access. The API surface may change between releases.
The Kape iOS SDK provides a native Swift API for building VPN-enabled iOS applications. It wraps the Low Level SDK and provides high-level modules for authentication, VPN connectivity, and server discovery.
Modules
| Module | Purpose |
|---|---|
| KapeCore | SDK initialization, configuration, keychain storage, logging |
| KapeAuth | OpenID Connect authentication with PKCE |
| KapeVPN | WireGuard VPN tunnel, server locations, connection management |
Each module is independent. Import only what your app needs:
import KapeCore // Always required
import KapeAuth // For authentication
import KapeVPN // For VPN connectivity
Quick Example
let settings = try KapeSDKSettings() // reads KapeSDK.plist
let handle = try KapeSdkHandle(settings: settings)
let auth = KapeAuthClient(handle: handle)
try await auth.login(presenting: viewController)
try handle.activateSubscription(for: .custom(values: ["xv.vpn"]))
let locations = KapeLocationService(handle: handle)
try await locations.fetchLocations()
let vpn = KapeVPNManager(handle: handle)
try await vpn.installProfile()
try await vpn.connect(to: locations.allLocations.first!.id)
Requirements
| Requirement | Minimum |
|---|---|
| iOS | 16.0 |
| Swift | 5.9 |
| Xcode | 15.4 |
| Device | Real device required for VPN (Simulator not supported) |