OnboardingSessionManager

public class OnboardingSessionManager<T> where T : OnboardingSession

Stores and manages one user’s OnboardingSession

  • 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

  • Opens a new session by ‘onboard’ or ‘restore’ using OnboardingController

    Declaration

    Swift

    public func open(inBackground: Bool = false) async throws
  • 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

  • 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() async throws
  • 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

  • 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() async throws
  • 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

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

    Declaration

    Swift

    public func unlock() async throws