Comment on page
Installation
Prerequisites: minimum supported iOS version is 11.0.
Import kevin. iOS dependency:
Swift Package Manager
Carthage
Cocoapods
- 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
Add this line to your
Cartfile
:github "getkevin/kevin-ios"
In your Podfile add kevin. dependency:
target 'MyApp' do
pod 'kevin-ios', '~> <latest-version>'
end
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 modified 2mo ago