SAPcpmsClientResourcesDownloadStep
open class SAPcpmsClientResourcesDownloadStep : OnboardingStep
Class for SAPcpmsClientResources 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 SAPcpmsClientResourcesDownloadStep can be created like the following code snippet
func customClientResourcesDownloadStep() -> OnboardingStep {
let step = SAPcpmsClientResourcesDownloadStep()
let sapcpmsClientResourcesDownloadStep = Bundle(for: SAPcpmsClientResourcesDownloadStep.self)
step.infoScreenText = NSLocalizedString("SAPcpmsClientResourcesDownloadInfoScreenTextKey", tableName: "ExampleTableName", bundle: sapcpmsDestinationDownloadBundle, value: "Example Info Screen Text", comment: "")
return step
}
-
The
OnboardingInfoKeyassociated with an instance of downloadedSAPcpmsSettings(PasscodePolicy and LogSettings) in theOnboardingContextinfo.Declaration
Swift
public var settingsInfoKey: OnboardingInfoKey -
Property to set the title of info screen
Declaration
Swift
public var infoScreenText: String -
Key prefix to store the
SAPcpmsClientResourcesin CredentialStoreDeclaration
Swift
public let sapcpmsClientResourcesStoreKeyPrefix: String -
Information about ClientResource
See moreDeclaration
Swift
public struct ClientResourceInfo -
Array of clientResourceInfo that downloads the step
Declaration
Swift
public let clientResourceInfoList: [ClientResourceInfo]! -
Initializes the object
Declaration
Swift
public init(clientResourceInfoList: [ClientResourceInfo] = [ClientResourceInfo()])Parameters
clientResourceInfoListarray of
ClientResourceInfocontaining the download info
-
Onboarding function with
OnboardingContextsupport; Downloads the ClientResources from mobile services.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 SAPcpmsClientResources download. If you want to download the configured ClientResources from mobile services then use the other onboard() function with
OnboardingContextsupport, or use ‘SAPcpmsClientResources’ component from SAPFoundation framework.Declaration
Swift
open func onboard(sapURLSession: SAPURLSession, credentialStore: CodableStoring, settingsParameters: SAPcpmsSettingsParameters, completionHandler: @escaping (Error?) -> Void)Parameters
sapURLSessionSAPURLSessionthat handle the connection to download settingssettingsParametersSAPcpmsSettingsParametersobjectcompletionHandlercalled when the process finished. Error filled on failure.
-
Restore function without context for SAPcpmsClientResources download.
Declaration
Swift
open func restore(sapURLSession: SAPURLSession, credentialStore: CodableStoring, settingsParameters: SAPcpmsSettingsParameters, completionHandler: @escaping (Error?) -> Void)Parameters
sapURLSessionSAPURLSessionthat handle the connection to download settingssettingsParametersSAPcpmsSettingsParametersobjectcompletionHandlercalled when the process finished. Error filled on failure.
-
This function resets the modifications of the SAPcpmsClientResourcesDownloadStep in the SAPURLSession.
Declaration
Swift
open func reset(completionHandler: @escaping () -> Void)Parameters
completionHandlercalled when the process finished.