OnboardingSessionManager
public class OnboardingSessionManager<T> where T : OnboardingSession
Stores and manages one user’s OnboardingSession
-
PasscodePolicyManager
Declaration
Swift
public var passcodePolicyManager: PasscodePolicyManager?
-
Represents the actual state of the session manager
See moreDeclaration
Swift
public enum State
-
Current state of the Onboarding process
Declaration
Swift
public var state: State { get set }
-
The Onboarding Controller of the Onboarding Session Manager
Declaration
Swift
public let onboardingController: OnboardingControlling
-
The Presentation Delegate of the Onboarding Session Manager
Declaration
Swift
public var presentationDelegate: ApplicationUIManaging
-
Convenience getter for the session. If the manager is not opened then it returns nil
Declaration
Swift
public var onboardingSession: T? { get }
-
Initializer
Declaration
Swift
public init(onboardingController: OnboardingControlling, presentationDelegate: ApplicationUIManaging)
Parameters
onboardingController
the Onboarding Controller of the Onboarding Session Manager
presentationDelegate
the Presentation Delegate of the Onboarding Session Manager
-
Convenience Initializer
Declaration
Swift
public convenience init(presentationDelegate: ApplicationUIManaging, flowProvider: OnboardingFlowProviding, onboardingIDManager: OnboardingIDManaging = SingleUserOnboardingIDManager(), delegate: OnboardingControllerDelegate? = nil)
Parameters
presentationDelegate
the Presentation Delegate of the Onboarding Session Manager
flowProvider
the flow provdider
onboardingIDManager
the OnboardingID manager should be used
delegate
OnboardingControllerDelegate
that tracks the progress of the given flow -
Opens a new session by ‘onboard’ or ‘restore’ using OnboardingController
Declaration
Swift
public func open(inBackground: Bool = false, completionHandler: @escaping (Error?) -> Void)
Parameters
completionHandler
closure called on completion
-
Invalidates the OnboardingSession.
OnboardingManager
goes to.initial
stateDeclaration
Swift
public func close()
-
Removes and invalidates the OnboardingSession and sets the state to
.initial
Using the session afterwards, the behavior is undefined CallsOnboardingController.resetFlow(for:)
Declaration
Swift
public func removeSession(completionHandler: @escaping (Error?) -> Void)
Parameters
completionHandler
closure called on completion
-
Locks the
OnboardingManager
. ThehideApplicationScreen
method will be called on the delegate. All the session properties remain valid and can be used by the application internally. Should be called for example when the application goes enters backround state. The session can be opened with anunlock
callDeclaration
Swift
public func lock(completionHandler: @escaping (Error?) -> Void)
Parameters
completionHandler
closure called on completion
-
Unlocks the
OnboardingManager
, callsshowSplashScreenForUnlock
on the delegate then initiates an passcode validation using thestoreManager
of the sessionDeclaration
Swift
public func unlock(completionHandler: @escaping (Error?) -> Void)
Parameters
completionHandler
closure called on completion