KLP iOS SDK — Integration Guide
Add the loyalty experience to your iOS app: install the SDK, initialize it, sign in your user and open the loyalty screen.
Requirements: iOS 15 or later, Xcode 26.2 or later
1. Adding the SDK to Your Project
Add the SDK with CocoaPods, Swift Package Manager or manually. The examples use version 1.0.11;
the latest version is listed in latest.json.
CocoaPods
Add this line to your Podfile, then run pod install:
pod 'KLPSDK', :podspec => 'https://sdk.kaizentech.net/klp/ios/KLPSDK/1.0.11/KLPSDK.podspec.json'
Swift Package Manager
Add the SDK as a binary target in your Package.swift and add "KLPSDK" to your target's
dependencies:
.binaryTarget(
name: "KLPSDK",
url: "https://sdk.kaizentech.net/klp/ios/KLPSDK/1.0.11/KLPSDK.xcframework.zip",
checksum: "120b52c80c6b080e5213bd7eca70253d72162319d76ec79ca9c18621fa0f6b64"
)
To update, change the version in the URL and replace the checksum with the one published for
that version at https://sdk.kaizentech.net/klp/ios/KLPSDK/<version>/KLPSDK.xcframework.zip.sha256.
Manual
- Download KLPSDK.xcframework.zip and unzip it.
- Drag
KLPSDK.xcframeworkinto your Xcode project. - In your app target, under Frameworks, Libraries, and Embedded Content, set it to Embed & Sign.
2. Initializing the SDK
Call initialize as early as possible (typically in AppDelegate or your @main App). If it fails due to security checks, the SDK will be unavailable; you should show an appropriate message to the user.
Debounced: repeated calls within 500ms of the previous one are silently ignored (even with a different config), to avoid redundant re-initialization from rapid duplicate calls.
import KLPSDK
func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
let config = KLPConfig(
environment: .prod,
debugMode: false, // true during development; false in production builds
showDebugScreen: false, // true: shows test FAB and debug screen (test builds only)
theme: isDark ? .dark : .light, // optional startup theme; omit to keep .system
language: "tr" // optional startup language (BCP-47); omit to follow the app
)
do {
try KLP.shared.initialize(config: config)
} catch let error as KLPError {
if case .securityChecksFailed(let result) = error {
for check in result.getFailedChecks() {
print("\(check.name): \(check.errorMessage ?? "")")
}
}
print(error.localizedDescription)
} catch {
print(error)
}
return true
}
Configuration Fields (Summary)
| Field | Description |
|---|---|
certificatePins | Optional. Pins for *.kaizenloyalty.com are bundled within the SDK; only add sha256/... pins for additional domains. |
environment | Selects endpoint set (.dev, .test, .prod). Defaults to .dev when not explicitly passed. |
debugMode | When true, security checks are disabled and verbose logging is enabled — development only. |
showDebugScreen | When true, auxiliary interfaces for testing are visible — keep disabled in production builds. |
onRefreshToken | Optional. Closure the SDK calls for a new access token — before it expires (if you gave an expiry) or when a service answers 401_Token (see Refreshing the access token). |
theme / language | Optional startup theme and language; omit to follow the device/app (see Theme). |
colors | Optional KLPColors — white-label colours of the SDK's own error screen (see Error screen). Omitted fields use the design defaults. |
Important: Endpoint defaults are managed inside the SDK and can be overridden via local file (KLPEndpointMatrix.local.swift). Trusted domains are automatically derived from the selected environment endpoints.
3. User Session
Identify the user after login for WebView and server-sent events (SSE); log out on sign-out.
// After login
KLP.shared.setUser(
accessToken: "access_token",
nameInitials: "GY" // optional, shown as avatar in webview
)
// On logout
KLP.shared.logout()
setUserandlogoutnever throw; if the SDK is not initialized yet, they safely no-op so the host app login/logout flow is not interrupted.- Call
setUseron every app start once you have a valid access token for the signed-in user, and again when the account changes. The session (access token, session id) is kept in memory only and is never written to disk, so it ends when the app process ends.
Refreshing the access token
Two ways, and you normally want the first one.
1. Let the SDK ask you (recommended, 1.0.8+). Hand the SDK a closure that returns a fresh token. The closure works in one of two modes, chosen by whether you give the SDK an expiry:
- Proactive — you pass an expiry (
setUser(expiresAt:),setToken(expiryDate:)orRefreshedToken.expiresAt). A minute before the token expires, every request that consumes it is held, your closure is called, the new token is stored and the request continues. - Reactive — no expiry (it is optional). The SDK does no time arithmetic at all. When any
service answers
401_Token, the original request is held, your closure is called and the request is resent with the new token — the user never notices.
A 401_Token is intercepted the same way in proactive mode too (clock skew, early revocation).
let config = KLPConfig(
environment: .prod,
onRefreshToken: {
let token = try await myAuthService.refreshAccessToken()
// `expiresAt` is optional: pass it for proactive mode, omit it for reactive mode.
return RefreshedToken(accessToken: token.value, expiresAt: token.expiresAt)
}
)
try KLP.shared.initialize(config: config)
// Can also be set, replaced or cleared after initialization:
KLP.shared.onRefreshToken = { /* ... */ }
KLP.shared.onRefreshToken = nil
- Asked at most once at a time. If several requests need a refresh together, your closure is called once and the others wait for that same result (single-flight).
- 30 second timeout. If your closure throws, times out, or returns an empty token, the
waiting request(s) fail with a typed
TokenRefreshError. The SDK never continues silently with an expired token. - Covers SSE too. While a stream is open the check runs periodically; the new connection is opened and verified before the old one is closed, so no effects are missed.
- Retried once per request. After a
401_Tokenthe request is resent at most once. - Loop protection. After 3 consecutive refresh attempts that did not end with the backend
accepting the new token — the backend kept rejecting it, or your closure failed / timed
out (proactive attempts included; successful proactive refreshes don't count) — the SDK stops
calling the closure (
TokenRefreshError.reactiveRefreshLimitReached). What the user sees: the WebView gets the original 401 witherrorCode: "KLP_AUTH_TOKEN_INVALID"and shows the "session expired" screen;logEventreports the error throughKLPDelegate; SSE stops until the nextsetUser. The count resets when a retried request gets any non-401 answer (a401_Challengedoes not count), when you callsetUser,setTokenwith a new token, orlogout. - Inert until
setUser. BeforesetUser(and afterlogout) the closure is never called; the challenge-token flow never calls it either. - If you pass
expiresAt, it must be at least 60 seconds in the future; a shorter lifetime is rejected (TokenRefreshError.invalidExpiry) because it would immediately need another refresh. - When the token cannot be refreshed (closure failed, loop protection tripped, or no
closure registered and the backend answered
401_Token) the WebView shows the "Your session has expired" screen — natively if the page had not loaded yet, otherwise inside the web page. Embedded: no buttons. Full screen: a "Close" button only.
2. Push a new token yourself. If your app refreshes on its own schedule, call setToken to
update the token the SDK uses for subsequent requests — without re-running the WebView/SSE
activation that setUser does:
let updated = KLP.shared.setToken(
accessToken: "new_access_token",
expiryDate: nil // optional
)
- Returns
false(no-op) if there is no active session oraccessTokenis empty. - Thread-safe: safe to call from any thread, including concurrently with in-flight requests.
RefreshedToken carries the fields the storage layer needs — accessToken and an optional
expiresAt; a bare string is not accepted. Both paths write through the same internal
storage, so mixing them is safe.
Late setToken. If the "session expired" screen is already showing and you then supply a
valid token with setToken (or setUser), the WebView reloads from the start. Normally the
token should arrive before it expires; this is only a recovery path.
4. Launching the Loyalty Screen (WebView)
// Home screen
try KLP.shared.launch(from: self)
// A specific path (e.g. rewards)
try KLP.shared.launch(from: self, path: "rewards")
Leading and trailing / in the path value are optional; the SDK handles concatenation.
Embedding the WebView as a Component
launch presents the loyalty screen modally, full screen. When you want the loyalty screen to live inside your own layout instead — a tab, a page in a container, a screen with your own navigation bar — use makeEmbeddedWebViewController. It returns a plain UIViewController that you add to your hierarchy yourself:
public func makeEmbeddedWebViewController(
path: String? = nil, // nil → home screen
onClose: (() -> Void)? = nil // called when the web content asks to be closed
) throws -> UIViewController
URL building, secure session headers, cid / theme / language parameters and the KLPDelegate event flow are identical to launch. The differences:
- The SDK never dismisses anything. Every close request coming from the web content (JS bridge
close, a deep link that asks for dismissal) callsonCloseon the main thread. Removing the controller is your responsibility — so treatonCloseas required, not optional: if you omit it, the user can end up on a screen with no way out. The error screen shows no "Kapat" button in embedded mode — inside your tab there is nothing for it to close. - No swipe-to-dismiss. The edge-swipe gesture is not installed, so it cannot fight your own navigation.
- The web app is told it is embedded via an
embedded=1query parameter, and renders without its own full-screen chrome. - Safe area is handled by the web content, through CSS variables the SDK injects and keeps up to date (
--safe-area-inset-top/bottom/left/right). Let the component fill the area edge to edge, including under the notch/Dynamic Island — do not inset it yourself.
UIKit
import UIKit
import KLPSDK
final class LoyaltyScreenViewController: UIViewController {
private var loyaltyViewController: UIViewController?
override func viewDidLoad() {
super.viewDidLoad()
embedLoyaltyWebView()
}
private func embedLoyaltyWebView() {
do {
let loyalty = try KLP.shared.makeEmbeddedWebViewController(
path: nil // or "rewards"
) { [weak self] in
// Web content requested close
self?.removeLoyaltyWebView()
}
// Proper child view controller containment is required (see notes below)
addChild(loyalty)
loyalty.view.translatesAutoresizingMaskIntoConstraints = false
view.addSubview(loyalty.view)
NSLayoutConstraint.activate([
loyalty.view.topAnchor.constraint(equalTo: view.topAnchor),
loyalty.view.leadingAnchor.constraint(equalTo: view.leadingAnchor),
loyalty.view.trailingAnchor.constraint(equalTo: view.trailingAnchor),
loyalty.view.bottomAnchor.constraint(equalTo: view.bottomAnchor)
])
loyalty.didMove(toParent: self)
loyaltyViewController = loyalty
} catch {
// KLPError.notInitialized — initialize() has not completed yet
print("KLP embed failed: \(error)")
}
}
private func removeLoyaltyWebView() {
guard let loyalty = loyaltyViewController else { return }
loyalty.willMove(toParent: nil)
loyalty.view.removeFromSuperview()
loyalty.removeFromParent()
loyaltyViewController = nil
// Close your own screen as well, if that is the behavior you want:
// navigationController?.popViewController(animated: true)
}
}
Keeping it alive across mounts
If the component sits in one of your main tabs, holding it in a property as above is usually not enough: most navigation containers (SwiftUI TabView bodies, Flutter/React Native platform views) tear the host down on every tab switch, so makeEmbeddedWebViewController runs again and the loyalty app loads from scratch. That reads as a web page, not a tab.
Use the reuse pair instead and the SDK hands the same controller back on the next mount, with its WKWebView, page, JS state, scroll position and history intact:
public func acquireEmbeddedWebViewController(
path: String? = nil,
onClose: (() -> Void)? = nil
) throws -> UIViewController
public func releaseEmbeddedWebViewController(_ controller: UIViewController)
public func invalidateEmbeddedWebViewCache()
acquireEmbeddedWebViewController is a drop-in replacement for makeEmbeddedWebViewController; call releaseEmbeddedWebViewController when your mount goes away (in addition to the containment teardown, which is unchanged — the SDK never touches your hierarchy).
struct KLPLoyaltyView: UIViewControllerRepresentable {
var onClose: () -> Void
func makeUIViewController(context: Context) -> UIViewController {
(try? KLP.shared.acquireEmbeddedWebViewController(onClose: onClose)) ?? UIViewController()
}
func updateUIViewController(_ controller: UIViewController, context: Context) {}
static func dismantleUIViewController(_ controller: UIViewController, coordinator: ()) {
KLP.shared.releaseEmbeddedWebViewController(controller)
}
}
The kept controller lives in memory only, for the lifetime of the process; nothing is written to disk. It is dropped — so the next acquireEmbeddedWebViewController loads fresh — when:
- the app process ends (a relaunch always loads fresh),
- the session changes (
setUser,logout), - the app language, the user's initials or the
pathchange, - the security checks fail — a broken controller is never kept.
Theme changes do not drop it: a running page is told about the new theme live, with no reload.
Call invalidateEmbeddedWebViewCache() to force a fresh load yourself, e.g. behind a "refresh" action. A controller that is mounted at that moment keeps running (you would otherwise be left with a blank WebView on screen).
One caveat: reuse assumes at most one live controller per path at a time. A view has one superview, so mounting a second component for the same path while the first is still on screen moves it to the second mount and blanks the first. If you genuinely need two at once, build the secondary one with makeEmbeddedWebViewController.
Hooking up your own back button
The returned controller conforms to KLPWebContentNavigating, so your back button can walk the web history first and only leave the loyalty screen when there is nothing left to go back to:
@objc private func backTapped() {
let navigator = loyaltyViewController as? KLPWebContentNavigating
// Consumed by the web history?
if navigator?.goBackInWebContent() == true { return }
// Web is already at its root → close the component
removeLoyaltyWebView()
}
// Optional: hide/show your back button based on web history
var canGoBack: Bool {
(loyaltyViewController as? KLPWebContentNavigating)?.canGoBackInWebContent ?? false
}
Both members are safe to call from any thread and return false when there is no history (or when the WebView has not been created yet, e.g. a failed security check).
SwiftUI
import SwiftUI
import KLPSDK
struct KLPLoyaltyView: UIViewControllerRepresentable {
var path: String? = nil
var onClose: () -> Void
func makeUIViewController(context: Context) -> UIViewController {
(try? KLP.shared.makeEmbeddedWebViewController(path: path, onClose: onClose))
?? UIViewController()
}
func updateUIViewController(_ controller: UIViewController, context: Context) {}
}
struct LoyaltyScreen: View {
@Environment(\.dismiss) private var dismiss
var body: some View {
KLPLoyaltyView { dismiss() }
.ignoresSafeArea()
}
}
Notes
- Use real containment.
addChild(...)+didMove(toParent:)— not justview.addSubview(loyalty.view). Without containment the controller's appearance callbacks never fire, and real-time (SSE) effects are not forwarded into the page. - Keep one instance at a time. Real-time effects are routed to the most recently appeared KLP WebView.
- Deep links behave differently. In embedded mode the SDK forwards the deep link to your app (closure / delegate / notification) but never removes the component, even if
klp(_:didRequestDeepLink:)returnstrue. Navigation is entirely your decision. klpDidCloseWebView(_:)is still called on the delegate alongsideonClose; use whichever fits your architecture, but onlyonClosetells you which embedded instance asked to close.- The component needs a non-zero frame; it always fills whatever container you place it in.
Launching Simulation Mode
Simulation mode opens a separate WebView from the loyalty/gamification screen:
try KLP.shared.launchSimulation(from: self)
The SDK still sends the secure session headers, current user ID (cid), app language and theme to the simulation WebView. During development the simulation WebView points to http://localhost:8888; domain checks are already enforced so this can be switched to a production HTTPS domain by the SDK team without changing app integration code.
5. Event Logging (Analytics / Triggers)
You can send events to the platform while a user session is active (after setUser). If there is no active session, the call is silently ignored.
KLP.shared.logEvent(eventName: "LogIn")
KLP.shared.logEvent(eventName: "MoneyTransfer", attributes: ["Quantity": 50])
KLP.shared.logEncryptedEvent(eventName: "LogIn")
KLP.shared.logEncryptedEvent(
eventName: "MoneyTransfer",
attributes: ["Quantity": 50, "Currency": "TRY"]
)
Event names and attribute keys must be aligned with KLP / your backend according to your business rules.
6. Delegate (Optional)
Default behaviors (e.g. the SDK's own notification popup for SSE) are sufficient for most scenarios. Assign a KLPDelegate for custom flows; default empty implementations are provided for methods you don't define.
final class MyScreen: UIViewController, KLPDelegate {
override func viewDidLoad() {
super.viewDidLoad()
KLP.shared.delegate = self
}
// Real-time effects from the server (points, mission progress, etc.)
// Return true to suppress the SDK's default popup and handle the UI yourself.
func klp(_ klp: KLP, didReceiveSSEEffects effects: [KLPSSEEffect]) -> Bool {
return false
}
// Reward earned from within the WebView
func klp(_ klp: KLP, didEarnReward reward: KLPReward) {
print("Reward: \(reward.name)")
}
// WebView was closed
func klpDidCloseWebView(_ klp: KLP) {}
// Deep link requested from within the WebView
// true: SDK closes the WebView; false: it stays open
func klp(_ klp: KLP, didRequestDeepLink deepLink: KLPDeepLink) -> Bool {
// Example: deepLink.queryParameters["symbol"]
return true
}
}
Other optional methods: didReceiveEvent, didFailWithError, didFailSecurityCheck.
7. Deep Link (Alternative Methods)
- Closure (most common):
KLP.shared.onDeepLink = { deepLink in
// Handle your app navigation here
return true // Return true if you want the WebView to close
}
- NotificationCenter (e.g. SwiftUI): Listen for the
KLPNotification.deepLinkRequestednotification;userInfocontainsKLPNotification.deepLinkKey(KLPDeepLink) andKLPNotification.deepLinkURLKey(URL).
8. Theme
The SDK uses KLP.shared.theme for the WebView and native interfaces:
.system— iOS system theme (default).light/.dark— Manual assignment based on your app's own theme selection
It is recommended to update this value whenever the in-app theme changes; otherwise the theme may appear inconsistent in modal WebView presentations.
KLP.shared.theme = .dark
For the starting value, pass theme: (and language:) to KLPConfig instead —
they are applied during initialize(config:), so nothing has to run right after
it just to open the WebView in the app's theme and language. Both are optional:
omitted (nil) leaves the SDK default (.system, and the app's own
localization) untouched.
SwiftUI example: update KLP.shared.theme using onChange when the theme changes.
Set KLP.shared.language whenever the user changes the app language (nil reverts to the
app's localization). With an active user session the SDK then reconnects the real-time (SSE)
stream in the new language and saves the user's language on the backend, so notifications
produced while the app is closed use it too. Call logout() before switching users.
Error screen
When the loyalty WebView (modal or embedded) or the simulation WebView cannot load, the SDK shows its own native, white-label error screen over the WebView area: a warning glyph, a generic title/body ("We could not connect!" / "Check your connection and try again."), a "Try again" button and a "Close" button. No wrapper or host code is needed.
-
Colours come from
KLPConfig.colors. The background is always a solid colour:Token Dark default Light default Override Background #0B0E14#FFFFFFbackgroundColorPrimary (retry button) #0670D4#0670D4primaryColorTitle #FFFFFF#0F172AtextColorBody / labels #94A3B8#64748BtextColorat 64% alphalet config = KLPConfig(environment: .prod,colors: KLPColors(light: KLPColorSet(primaryColor: UIColor(red: 0, green: 0.4, blue: 0.3, alpha: 1)),dark: KLPColorSet(backgroundColor: .black))) -
Colours come from the backend: the
/sdkconfigurationskeystatusScreenColors(entered per application in the KLP panel) —{ "light": { "backgroundColor", "primaryColor", "textColor" }, "dark": { … } }, values#RRGGBB/#AARRGGBB, every field optional; the value may also be that JSON as a string.primaryColorpaints the buttons and the glyphs (warning disk, maintenance gear; the exclamation mark picks dark or white for contrast). Per field the backend wins overKLPConfig.colors, which wins over the design defaults — brand wrappers and hosts need not pass anything. -
Light/dark follows
KLP.shared.theme(.system→ the system appearance). -
Language follows
KLP.shared.language(KLPConfig.language); unset → the device language.tr*→ Turkish, anything else → English. Brands can replace the copy withKLPWebViewErrorStrings.override(e.g.KLPWebViewErrorStrings(genericTitle:genericBody:retry:close:codeLabel:detailLabel:)). -
Try again is shown only for retryable (transient) failures.
-
visibility=false(KLP_CONFIG_DISABLED) is not an error: the embedded WebView shows a maintenance variant of the same screen instead — gear + wrench glyph, "Bu özellik şu anda kullanıma açık değil" / "This feature is not available right now" copy, no buttons. Override the copy with the optionalmaintenanceTitle:/maintenanceBody:init parameters ofKLPWebViewErrorStrings(omitted → built-in text in the current language). Host notifications are unchanged (loadStatestill becomes.failed(code: "KLP_CONFIG_DISABLED")).launch(from:)still does not open at all while the SDK is disabled. -
Unsupported version: when the challenge service answers
Code: 2022(this app version) orCode: 2023(this KLP SDK version), the SDK behaves as if it was never initialized and the embedded WebView shows "Güncelleme gerekiyor" / "Update required" with no retry. The user is not told which one; the debug-only technical detail names it (KLP_APP_VERSION_UNSUPPORTED/KLP_SDK_VERSION_UNSUPPORTED, plus both versions). -
The error code (
KLP_*, tap to copy) and the technical detail are shown only whenshowDebugScreenistrue(debugModeonly switches the security checks off). End users never see internal identifiers. -
Failed security checks show the same screen with code
KLP_SECURITY_FAILEDand no retry (previously a hardcoded Turkish alert).didFailSecurityCheckis still delivered. Every blocked code (KLP_SECURITY_FAILED,KLP_SECURITY_URL_BLOCKED,KLP_AUTH_SIGNATURE_REJECTED,KLP_AUTH_CHALLENGE_EXPIRED) shows the generic security copyblockedTitle/blockedBody— "Güvenlik nedeniyle bu özellik şu anda kullanılamıyor." / "For security reasons this feature is currently unavailable." — never the reason itself.
9. UI Components — Not Part of the Core SDK
This SDK is a core SDK. The only user interface it presents is the loyalty WebView (sections 4 and 10). It deliberately ships no banner, card, button or other embeddable UI component.
The reason is that such components are brand-specific: their copy, colors, corner radii and placement differ per bank. They belong in the layer that owns the brand — a brand-specific wrapper SDK or the host application itself. Keeping them out of the core also keeps the core's public API and its binary free of brand assets.
Earlier versions exposed
KLPBanner,KLPBannerView,KLPSimulationWidget,SimulationWidgetandSimulationWidgetConfig. They are no longer part of the SDK.
The API your component builds on
Everything a component of your own needs is public:
| API | Purpose |
|---|---|
KLP.shared.launch(from:) / launch(from:path:) | Open the loyalty WebView |
KLP.shared.launchSimulation(from:) | Open simulation mode |
KLP.shared.theme | Current KLPTheme (.light / .dark / .system) |
KLP.themeDidChangeNotification | Observe to restyle on theme change |
KLP.languageDidChangeNotification | Observe to refresh your own copy |
KLP.shared.preferredLanguageCode | Active language (tr, en) for your default strings |
KLP.shared.isInitialized / sdkReadinessMessage() | Guard taps before the SDK is ready |
KLP.shared.getConfig() | The backend configuration (/sdkconfigurations) as a dictionary, as set in the KLP panel. nil until setUser has completed with the feature visible. The SDK gives the keys no meaning — read and validate the ones you use |
Taps are safe to wire directly: while the SDK is not ready — not initialized, setUser not
completed, or the backend answered visibility=false — launch and launchSimulation do
nothing and do not throw (the SDK behaves as if it was never initialized). Use
sdkReadinessMessage() if you want to know why.
10. Security & Diagnostics (Brief)
- Use
debugMode: falseandshowDebugScreen: falsein production builds. - Optional: use
KLP.shared.isDeviceSecure()orperformSecurityChecks()to check device status. - When
debugMode: true,printDebugInfo()can output detailed console logs (development only).
11. Common Errors
| Condition | Possible Cause |
|---|---|
notInitialized | initialize was not called, or security checks failed. |
securityChecksFailed | Jailbreak, debugger, simulator (production profile), or other security rules. Temporarily use debugMode: true during development. |
logEvent has no effect | setUser was not called, or the session has no access token. |
TokenRefreshError | Your onRefreshToken closure threw, timed out (30 s), or returned an empty token. The request fails instead of continuing with an expired token. |
TokenRefreshError.reactiveRefreshLimitReached | 3 consecutive refresh attempts after a 401_Token did not end with an accepted token — the backend kept rejecting the tokens onRefreshToken returned, or the closure itself failed / timed out. The SDK stops calling the closure until setUser, setToken with a new token, or logout — check that your closure succeeds and returns a token the KLP backend accepts. |
| WebView shows an error screen | The embedded WebView reports a stable code (e.g. KLP_CONFIG_UNAUTHORIZED, KLP_AUTH_CHALLENGE_EXPIRED); read it with KLP.shared.sdkReadinessCode(). An embedded controller conforms to KLPWebViewRetrying, so you can start the load again with retryLoad(). The code and technical detail are printed on the screen itself only when debugMode is true. |
| "Security checks failed" alert no longer appears | By design: a failed device security check shows the native error screen with KLP_SECURITY_FAILED (no retry); didFailSecurityCheck is still called. |
12. Version
You can read the embedded SDK version using the KLP.version constant.
For questions, contact the KLP integration team.