INNER CODE UNIT · Swift
AppDelegate
arkivanov/Decompose · sample/app-ios-compose/app-ios-compose/iOSApp.swift:17
class AppDelegate: NSObject, UIApplicationDelegate {
private var stateKeeper = StateKeeperDispatcherKt.StateKeeperDispatcher(savedState: nil)
var backDispatcher: BackDispatcher = BackDispatcherKt.BackDispatcher()
lazy var root: RootComponent = DefaultRootComponent(
componentContext: DefaultComponentContext(
lifecycle: ApplicationLifecycle(),
stateKeeper: stateKeeper,
instanceKeeper: nil,
backHandler: backDispatcher
),
featureInstaller: DefaultFeatureInstaller.shared,
deepLinkUrl: nil
)
func application(_ application: UIApplication, shouldSaveSecureApplicationState coder: NSCoder) -> Bool {
StateKeeperUtilsKt.save(coder: coder, state: stateKeeper.save())
return true