ApplicationUIManaging
public protocol ApplicationUIManaging : AnyObject
Implementers should manage the presentation of screens to show the proper one according to the application state, UI requirements, interaction and behavior design etc The methods can be called multiple times and implementers have to be prepared to handle the situations properly. Application specific configurations can be: - what splash screen is used during onboarding - how the splash screen is presented during onboarding (replacing rootViewController of the window or presenting modally etc) - how the locking is handled: – whether splash screen is presented to hide the screen – which splash screen is used – how splash screen is presented
-
Called when the application goes to background (not closed). Implementers can hide the application screen if needed for application design. Later after a successful unlock the screens should be restored properly when the
showApplicationScreen
method is called, so the original application screen must be saved (if it was presented). For example by saving the originalrootViewController
in a property if the callee manipulates the rootViewControllerDeclaration
Swift
func hideApplicationScreen(scene sessionID: String?, completionHandler: @escaping (Error?) -> Void)
Parameters
sessionID
persistentIdentifier
ofUISceneSession
associated with theUIScene
where the screen needed to hidecompletionHandler
must be called when the UI update finished
-
Called when an onboarding or restoring starts. Implementers have to present the appropriate (splash) screen. When
ModalUIViewControllerPresenter
is used in the flow the presented splash screen must be set on the presenter!Declaration
Swift
func showSplashScreenForOnboarding(completionHandler: @escaping (Error?) -> Void)
Parameters
completionHandler
must be called when the UI update finished
-
Called when an
unlock
scenario runs. Optional delegate. By default it calls showSplashScreenForOnboardingDeclaration
Swift
func showSplashScreenForUnlock(completionHandler: @escaping (Error?) -> Void)
Parameters
completionHandler
must be called when the UI update has completed
-
Called when a successful onboard, restore or unlock finishes and the application screen can be presented. This is called before the OnboardingController’s completionHandler calls back the application.
Declaration
Swift
func showApplicationScreen(scene sessionID: String?, completionHandler: @escaping (Error?) -> Void)
Parameters
sessionID
persistentIdentifier
ofUISceneSession
associated withUIScene
where the application screen needed to showcompletionHandler
must be called when the UI update has completed
-
Called when an onboarding or restoring process is inProcess. Implementers have to present the appropriate (Progress) screen.
Declaration
Swift
func showProgressScreenForOnboarding(scene sessionID: String, completionHandler: @escaping (Error?) -> Void)
Parameters
sessionID
persistentIdentifier
of theUISceneSession
of theUIScene
where the progress screen needed to showcompletionHandler
must be called when the UI update has completed