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
OnboardingInfoKey
associated with an instance of downloadedSAPcpmsSettings
(PasscodePolicy and LogSettings) in theOnboardingContext
info.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
SAPcpmsClientResources
in 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
clientResourceInfoList
array of
ClientResourceInfo
containing the download info
-
Onboarding function with
OnboardingContext
support; Downloads the ClientResources from mobile services.Declaration
Swift
open func onboard(context: OnboardingContext, completionHandler: @escaping (OnboardingResult) -> Void)
Parameters
context
OnboardingContext
object which contains every information for the OnboardingStepcompletionHandler
called when the process finished. Error filled on failure.
-
Restore function with
OnboardingContext
supportDeclaration
Swift
open func restore(context: OnboardingContext, completionHandler: @escaping (OnboardingResult) -> Void)
Parameters
context
OnboardingContext
object which contains every information for the OnboardingStepcompletionHandler
called when the process finished. Error filled on failure.
-
resetPasscode function with
OnboardingContext
supportDeclaration
Swift
open func resetPasscode(context: OnboardingContext, completionHandler: @escaping (OnboardingResult) -> Void)
Parameters
context
completionHandler
called when the process finished. Step OnboardingResult filled.
-
This function resets the modifications of SAPcpmsDownloadStep modifications in
OnboardingContext
Declaration
Swift
open func reset(context: OnboardingContext, completionHandler: @escaping () -> Void)
Parameters
context
OnboardingContext
object which contains every information for the OnboardingStepcompletionHandler
called 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
OnboardingContext
support, or use ‘SAPcpmsClientResources’ component from SAPFoundation framework.Declaration
Swift
open func onboard(sapURLSession: SAPURLSession, credentialStore: CodableStoring, settingsParameters: SAPcpmsSettingsParameters, completionHandler: @escaping (Error?) -> Void)
Parameters
sapURLSession
SAPURLSession
that handle the connection to download settingssettingsParameters
SAPcpmsSettingsParameters
objectcompletionHandler
called 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
sapURLSession
SAPURLSession
that handle the connection to download settingssettingsParameters
SAPcpmsSettingsParameters
objectcompletionHandler
called 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
completionHandler
called when the process finished.