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 sapcpmsDestinationDownloadBundle = Bundle(for: SAPcpmsDestinationsDownloadStep.self)
   step.infoScreenText = NSLocalizedString("SAPcpmsDestinationsDownloadInfoScreenTextKey", tableName: "ExampleTableName", bundle: sapcpmsDestinationDownloadBundle, value: "Example Info Screen Text", comment: "")

   return step
}

  • The OnboardingInfoKey associated with an instance of SAPcpmsSettingsParameters in the OnboardingContext info.

    Declaration

    Swift

    public var settingsInfoKey: OnboardingInfoKey
  • Property to set the title of info screen

    Declaration

    Swift

    public var infoScreenText: String
  • Initializer for SAPcpmsDestinationsDownloadStep. Use this initializer to configure whether remote destinations should be loaded in addition to the default destinations.

    Declaration

    Swift

    public init(loadRemoteDestinations: Bool? = nil)

    Parameters

    loadRemoteDestinations

    A Boolean value indicating whether the step should also download configured remote destinations from mobile services.

    If true, after successfully completing this step in onboarding or restore flow, the remote destinations can be accessed from the remoteDestinations parameter of SAPcpmsSettingsParameters.

  • Onboarding function without context for SAPcpmsDestinations download.

    Declaration

    Swift

    open func onboard(sapURLSession: SAPURLSession, settingsParameters: SAPcpmsSettingsParameters, completionHandler: @escaping ([OnboardingInfoKey : Any]?, Error?) -> Void)

    Parameters

    sapURLSession

    SAPURLSession that handles the connection to download destination

    settingsParameters

    SAPcpms settings metadata to be able to concatenate the SAPcpms URL

    completionHandler

    called 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

    sapURLSession

    SAPURLSession that handles the connection to download destination

    settingsParameters

    SAPcpms settings metadata to be able to concatenate the SAPcpms URL

    completionHandler

    called 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

    completionHandler

    called when the process finished.