Skip to content

Coordinator-MVVM + shouldRestoreApplicationState #10

@mehdok

Description

@mehdok

I have implemented The MVVM+Coordinator in my app and now i want to preserve my app state.
so i enabled saving app state via:

public func application(_ application: UIApplication, shouldSaveApplicationState coder: NSCoder) -> Bool {
        return true
    }

public func application(_ application: UIApplication, shouldRestoreApplicationState coder: NSCoder) -> Bool {
        return true
    }

and some other codes to save and restore some variable in my ViewControllers.
The problem is in MVVMC approach each coordinator result attached to previous ViewController and just creating view controllers for restoration is not sufficient.

So how can i implement this ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions