Customizing SDK Behavior
Customize Onside SDK behavior using OnsideDelegate and OnsideAppearance — control UI themes, screen presentation, login routing, country code hinting, and global styling.
protocol OnsideDelegate: AnyObject {
@MainActor func onside(hostWindowSceneForScreen screen: OnsideScreen) -> UIWindowScene?
@MainActor func onside(uiThemeOverrideForScreen screen: OnsideScreen) -> OnsideUIThemeMode?
@MainActor func onsideShouldForceLocalLoginMethods() -> Bool
@MainActor func onsideDefaultCountryCodeAssumption() -> String?
}// AppDelegate.swift
import UIKit
import OnsideKit
@main
class AppDelegate: UIResponder, UIApplicationDelegate, OnsideDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
Onside.initialize()
Onside.callbackScheme = "com.yourapp.auth"
Onside.delegate = self
// Your other app setup code...
return true
}
// ... Implement delegate methods below
}Providing a Pre-Login Country Code Hint
Specifying the Host Window Scene
Overriding the screen UI Theme
Forcing In-App Login
Setting the Global Theme
Last updated
Was this helpful?