Installation
Prerequisites: minimum supported iOS version is 9.0
Import kevin. iOS dependency:
Swift Package Manager
Carthage
  1. 1.
    In Xcode, select File > Swift Packages > Add Package Dependency and enter https://github.com/getkevin/kevin-ios as the repository URL.
  2. 2.
    Select a minimum version of 1.8.0
  3. 3.
    Add the kevin. product to the target of your application
Add this line to your Cartfile:
1
github "getkevin/kevin-ios"
Copied!
Initialize plugins you will use in the SwiftUI App or AppDelegate:
1
import SwiftUI
2
import Kevin
3
4
@main
5
struct KevinDemoApp: App {
6
7
init() {
8
// setup your custom theme which extends KevinTheme
9
Kevin.shared.theme = KevinTheme()
10
// set optional locale, default is English locale
11
Kevin.shared.locale = Locale(identifier: "en")
12
// initialize required plugins with your callback urls
13
KevinAccountsPlugin.shared.configure(
14
KevinAccountsConfiguration.Builder(
15
callbackUrl: URL(string: "https://your.callback.url")!
16
).build()
17
)
18
KevinInAppPaymentsPlugin.shared.configure(
19
KevinInAppPaymentsConfiguration.Builder(
20
callbackUrl: URL(string: "https://your.callback.url")!
21
).build()
22
)
23
}
24
}
Copied!
Copy link