SAPcpmsDestinationsDownloadStep
open class SAPcpmsDestinationsDownloadStep : OnboardingStep
Class for SAPcpmsDestinations download onboarding step handling
Customization
During the onboarding flow, if there is a splash screen which shows a text, that text can be changed/localized.
// The localized SAPcpmsDestinationsDownloadStep can be created like the following code snippet
func customDestinationsDownloadStep() -> OnboardingStep {
let step = SAPcpmsDestinationsDownloadStep()
let sapcpmsDestinationsDownloadStep = Bundle(for: SAPcpmsDestinationsDownloadStep.self)
step.infoScreenText = NSLocalizedString("SAPcpmsDestinationsDownloadInfoScreenTextKey", tableName: "ExampleTableName", bundle: sapcpmsDestinationDownloadBundle, value: "Example Info Screen Text", comment: "")
return step
}
-
The
OnboardingInfoKeyassociated with an instance ofSAPcpmsSettingsParametersin theOnboardingContextinfo.Declaration
Swift
public var settingsInfoKey: OnboardingInfoKey -
Property to set the title of info screen
Declaration
Swift
public var infoScreenText: String -
Default initializer
Declaration
Swift
public init()
-
Onboarding function with
OnboardingContextsupport; Downloads the Destinations from mobile services and updates the stored ‘SAPcpmsSettingsParameters’ with them in the ‘context’.Declaration
Swift
open func onboard(context: OnboardingContext, completionHandler: @escaping (OnboardingResult) -> Void)Parameters
contextOnboardingContextobject which contains every information for the OnboardingStepcompletionHandlercalled when the process finished. Error filled on failure.
-
Restore function with
OnboardingContextsupportDeclaration
Swift
open func restore(context: OnboardingContext, completionHandler: @escaping (OnboardingResult) -> Void)Parameters
contextOnboardingContextobject which contains every information for the OnboardingStepcompletionHandlercalled when the process finished. Error filled on failure.
-
resetPasscode function with
OnboardingContextsupportDeclaration
Swift
open func resetPasscode(context: OnboardingContext, completionHandler: @escaping (OnboardingResult) -> Void)Parameters
contextcompletionHandlercalled when the process finished. Step OnboardingResult filled.
-
This function resets the modifications of SAPcpmsDownloadStep modifications in
OnboardingContextDeclaration
Swift
open func reset(context: OnboardingContext, completionHandler: @escaping () -> Void)Parameters
contextOnboardingContextobject which contains every information for the OnboardingStepcompletionHandlercalled when the process finished.
-
Onboarding function without context for SAPcpmsDestinations download.
Declaration
Swift
open func onboard(sapURLSession: SAPURLSession, settingsParameters: SAPcpmsSettingsParameters, completionHandler: @escaping ([OnboardingInfoKey : Any]?, Error?) -> Void)Parameters
sapURLSessionSAPURLSessionthat handles the connection to download destinationsettingsParametersSAPcpms settings metadata to be able to concatenate the SAPcpms URL
completionHandlercalled when the process finished. Error filled on failure.
-
Restore function without context for SAPcpmsDestinations download.
Declaration
Swift
open func restore(sapURLSession: SAPURLSession, settingsParameters: SAPcpmsSettingsParameters, completionHandler: @escaping ([OnboardingInfoKey : Any]?, Error?) -> Void)Parameters
sapURLSessionSAPURLSessionthat handles the connection to download destinationsettingsParametersSAPcpms settings metadata to be able to concatenate the SAPcpms URL
completionHandlercalled when the process finished. Error filled on failure.
-
This function resets the modifications of the SAPcpmsDestinationsDownloadStep in the SAPURLSession.
Declaration
Swift
open func reset(completionHandler: @escaping () -> Void)Parameters
completionHandlercalled when the process finished.