Skip to main content

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

ModulePurpose
KapeCoreSDK initialization, configuration, keychain storage, logging
KapeAuthOpenID Connect authentication with PKCE
KapeVPNWireGuard 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

RequirementMinimum
iOS16.0
Swift5.9
Xcode15.4
DeviceReal device required for VPN (Simulator not supported)