OnboardingStep
public protocol OnboardingStep : AnyObject
OnboardingStep Represents a step in the onboarding/restoring flow.
-
Implementers must do their appropriate task here based on information can be found int the
OnboardingContext
and must use theinfo
andcredentialStore
fields to read/provide/store their obtained/created informationDeclaration
Swift
func onboard(context: OnboardingContext, completionHandler: @escaping (OnboardingResult) -> Void)
Parameters
context
the
OnboardingContext
must contain all the necessary parameters; Config provider steps must put the transformed configuration to here; Steps performing authentications must configure the sapURLSession field accordingly.completionHandler
must be called by the implementers when the step finishes
-
Implementers must do their appropriate task here based on information can be found int he
OnboardingContext
and must use theinfo
andcredentialStore
fields to read/provide/store their obtained/created informationDeclaration
Swift
func restore(context: OnboardingContext, completionHandler: @escaping (OnboardingResult) -> Void)
Parameters
context
the
OnboardingContext
must contain all the necessary parameters; Config provider steps must put the transformed configuration to here; Steps performing authentications must configure the sapURLSession field accordingly.completionHandler
must be called by the implementers when the step finishes
-
background(context:completionHandler:)
Default implementationImplementers must do their appropriate task here based on information found in the
OnboardingContext
and must use theinfo
andcredentialStore
fields to read/provide/store their obtained/created informationDefault Implementation
Implementers must do their appropriate task here based on information found in the
OnboardingContext
and must use theinfo
andcredentialStore
fields to read/provide/store their obtained/created informationDeclaration
Swift
func background(context: OnboardingContext, completionHandler: @escaping (OnboardingResult) -> Void)
Parameters
context
the
OnboardingContext
must contain all the necessary parameters; Config provider steps must put the transformed configuration to here; Steps performing authentications must configure the sapURLSession field accordingly.completionHandler
must be called by the implementers when the step finishes
-
resetPasscode(context:completionHandler:)
Default implementationImplementers must do their appropriate task here based on information found in the
OnboardingContext
and must use theinfo
andcredentialStore
fields to read/provide/store their obtained/created informationDefault Implementation
Implementers must do their appropriate task here based on information found in the
OnboardingContext
and must use theinfo
andcredentialStore
fields to read/provide/store their obtained/created informationDeclaration
Swift
func resetPasscode(context: OnboardingContext, completionHandler: @escaping (OnboardingResult) -> Void)
Parameters
context
the
OnboardingContext
must contain all the necessary parameters; Config provider steps must put the transformed configuration to here; Steps performing authentications must configure the sapURLSession field accordingly.completionHandler
must be called by the implementers when the step finishes
-
When called the step has to clear every stored state which possible so a next onboarding can be started
Declaration
Swift
func reset(context: OnboardingContext, completionHandler: @escaping () -> Void)
Parameters
context
need a context which contains the onboardingID even if the
store
is closedcompletionHandler
called when the reset finishes