OnboardingSessionManager

public class OnboardingSessionManager<T> where T : OnboardingSession

Stores and manages one user’s OnboardingSession

  • Represents the actual state of the session manager

    See more

    Declaration

    Swift

    public enum State
  • Current state of the Onboarding process

    Declaration

    Swift

    public var state: OnboardingSessionManager<T>.State
  • 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(completionHandler: @escaping (Error?) -> Void)

    Parameters

    completionHandler

    closure called on completion

  • Invalidates the OnboardingSession. OnboardingManager goes to .initial state

    Declaration

    Swift

    public func close()
  • Removes and invalidates the OnboardingSession and sets the state to .initial Using the session afterwards, the behavior is undefined Calls OnboardingController.resetFlow(for:)

    Declaration

    Swift

    public func removeSession(completionHandler: @escaping (Error?) -> Void)

    Parameters

    completionHandler

    closure called on completion

  • Locks the OnboardingManager. The hideApplicationScreen 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 an unlock call

    Declaration

    Swift

    public func lock(completionHandler: @escaping (Error?) -> Void)

    Parameters

    completionHandler

    closure called on completion

  • Unlocks the OnboardingManager, calls showSplashScreenForUnlock on the delegate then initiates an passcode validation using the storeManager of the session

    Declaration

    Swift

    public func unlock(completionHandler: @escaping (Error?) -> Void)

    Parameters

    completionHandler

    closure called on completion