iOS SDK
Configuration
How to configure the ProxyKit iOS SDK
SDK Configuration
Configure the ProxyKit SDK with your app credentials from the dashboard.
Basic Setup
SwiftUI
import SwiftUI
import AIProxy
@main
struct MyApp: App {
init() {
do {
try AIProxy.configure()
.withAppId("app_YOUR_APP_ID_HERE")
.withEnvironment(.production)
.build()
} catch {
print("Failed to configure AIProxy: \(error)")
}
}
var body: some Scene {
WindowGroup {
ContentView()
}
}
}
UIKit
import UIKit
import AIProxy
@main
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
do {
try AIProxy.configure()
.withAppId("app_YOUR_APP_ID_HERE")
.withEnvironment(.production)
.build()
} catch {
print("Failed to configure AIProxy: \(error)")
}
return true
}
}
Configuration Options
Required: App ID
Get your App ID from the ProxyKit dashboard:
.withAppId("app_xxxxxxxxxxxxxxxxxxxxxxxx")
Optional: Environment
.withEnvironment(.production) // Default
.withEnvironment(.development) // For testing
Optional: Log Level
.withLogLevel(.error) // Default - Only errors
.withLogLevel(.info) // Informational messages
.withLogLevel(.debug) // Detailed debugging