Installation

Prerequisites: minimum supported iOS version is 11.0.

Import kevin. iOS dependency:

  1. In Xcode, select File > Swift Packages > Add Package Dependency and enter https://github.com/getkevin/kevin-ios as the repository URL.

  2. Select the most recent version of the SDK.

  3. Add the kevin. product to the target of your application

Latest SDK version can be found here.

Initialize plugins you will use in the SwiftUI App or AppDelegate. Check our customizations section for a guide on how to customise the SDK UI.

import SwiftUI
import Kevin

@main
struct KevinDemoApp: App {
    
    init() {
        //  setup your custom theme which extends KevinTheme
        Kevin.shared.theme = KevinTheme()
        //  set optional locale, default is English locale
        Kevin.shared.locale = Locale(identifier: "en")
        //  initialize required plugins with your callback urls
        KevinAccountsPlugin.shared.configure(
            KevinAccountsConfiguration.Builder(
                callbackUrl: URL(string: "https://your.callback.url")!
            ).build()
        )
        KevinInAppPaymentsPlugin.shared.configure(
            KevinInAppPaymentsConfiguration.Builder(
                callbackUrl: URL(string: "https://your.callback.url")!
            ).build()
        )
    }
}

Last updated