Documentation Index
Fetch the complete documentation index at: https://docs.rampkit.com/llms.txt
Use this file to discover all available pages before exploring further.
Initialize
Import the SDK and initialize it early in app launch (e.g., in application(_:didFinishLaunchingWithOptions:)).
import RampKit
@main
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
RampKit.initSdk(
apiKey: "YOUR_API_KEY",
environment: .production,
autoShowOnboarding: false,
onOnboardingFinished: { payload in
// handle completion
}
)
return true
}
}
SwiftUI App example:
import SwiftUI
import RampKit
@main
struct MyApp: App {
init() {
RampKit.initSdk(
apiKey: "YOUR_API_KEY",
environment: .staging,
autoShowOnboarding: false,
onOnboardingFinished: { payload in
print("Flow finished: \(payload)")
}
)
}
var body: some Scene {
WindowGroup {
ContentView()
}
}
}
Recommended options:
environment: .production or .staging
autoShowOnboarding: present automatically if a flow is available after init
onOnboardingFinished: receive completion payloads for analytics