Other Classes

The following classes are available globally.

  • Onboarding ID Store for Multiple User

    See more

    Declaration

    Swift

    open class MultiUserOnboardingIDManager : OnboardingIDManaging
  • Onboarding ID Store for a single user

    See more

    Declaration

    Swift

    open class SingleUserOnboardingIDManager : OnboardingIDManaging
  • Undocumented

    See more

    Declaration

    Swift

    public class PasscodePolicyManager : PasscodePolicyManaging
  • Undocumented

    See more

    Declaration

    Swift

    public class NotificationBannerView : UIView
  • Onboarding step implementation of APIKey Authentication Used in the onboarding/restoring flow, this step is responsible to configure the app’s URLSession to be able to communicate with apikey authentication protected resources. Creates and registers the APIKeyAuthenticationObserver to the SAPURLSession, then sends a validation request.

    See more

    Declaration

    Swift

    open class APIKeyAuthenticationStep : OnboardingStep
  • An Onboarding step implementation which registers AttestationObserver to the SAPURLSession in the onboard, restore and reset passcode flow.

    Use this step to ensure that requests your server receives come from legitimate instances of your application.

    SAP BTP SDK For iOS uses Apple’s DeviceCheck framework to assert the legitimacy of a particular instance of your application to SAP Mobile Services from where administrators can assess the fraud risk and eventually enforce HTTP communication for asserted devices only.

    For more information on AppAttest: https://developer.apple.com/documentation/devicecheck/establishing_your_app_s_integrity

    See more

    Declaration

    Swift

    public class ApplicationAttestationStep : OnboardingStep
  • An OnboardingStep capable of registering the CSRFTokenObserver in the onboard / restore flow. Use this step if you enabled CSRF Protection for your app in SAP Mobile Services.

    See more

    Declaration

    Swift

    open class SAPcpmsCSRFTokenConfigurationStep : SimpleTaskStep
  • An OnboardingStep capable of registering the ApplicationVersionObserver in the onboard / restore flow. Use this step if you want to check if the application version is active / inactive in the mobile services.

    See more

    Declaration

    Swift

    public class ApplicationVersionStep : SimpleTaskStep
  • Instantiates an OnboardingStep capable of registering the SAPPassportObserver in the onboard / restore flow.

    If you wish to use this funcionality in manual mode, you can use this one-liner instead of this class:

    sapURLSession.register(SAPPassportObserver())
    
    See more

    Declaration

    Swift

    open class SAPPassportObserverConfigurationStep : SimpleTaskStep
  • Instantiates an OnboardingStep that uses the downloaded SAPcpmsSettings to determine the security policies set from Mobile Services and applies them.

    There are four types of security policies that we read and act upon in this step:

    1. DeviceComplianceDetectionPolicy
    2. ClipboardAccessPolicy
    3. PrintPolicy
    4. OpenURLPolicy

    SAPcpmsSecurityPolicyApplyStep performs the following actions during an onboard, restore, and passcode reset.

    1. If DeviceComplianceDetectionPolicy is set to report: Performs a detection check and uploads the compliance status to Mobile Services.
    2. If DeviceComplianceDetectionPolicy is set to ignore: Does not perform a detection check or upload any compliance status to Mobile Services.
    3. If unable to determine DeviceComplianceDetectionPolicy: Does not perform a detection check or upload any compliance status to Mobile Services.
    4. If ClipboardAccessPolicy is set to blocked: ClipboardProtectionEnforcer prevents cut, copy, and paste actions between this app and any other app.
    5. If ClipboardAccessPolicy is set to unrestricted: ClipboardProtectionEnforcer does not prevent cut, copy, and paste actions between this app and other apps.
    6. If unable to determine ClipboardAccessPolicy: ClipboardProtectionEnforcer does not intervene with the default app’s behavior.
    7. If PrintPolicy is set to blocked: PrintPolicyEnforcer prevents the printing of an app’s content.
    8. If OpenURLPolicy is set to blocked: OpenURLPolicyEnforcer prevents the opening of URLs in external applications.
    9. If PrintPolicy and OpenURLPolicy are set to unrestricted: APIs for print and opening URLs are restored.

    Precondition

    SAPcpmsSecurityPolicyApplyStep needs to run anytime after SAPcpmsSettingsDownloadStep. SAPcpmsSettingsDownloadStep, usually used indirectly through SAPcpmsDefaultSteps.settingsDownload, will obtain the required policy information.

    Note

    SAPcpmsSecurityPolicyApplyStep will return OnboardingResult.success even if the compliance status upload fails due to a lack of network connectivity.

    Usage

    public var onboardingSteps: [OnboardingStep] {
      return [
       // ...
       CompositeStep(steps: SAPcpmsDefaultSteps.settingsDownload),
       CompositeStep(steps: SAPcpmsDefaultSteps.applyDuringOnboard),
       SAPcpmsSecurityPolicyApplyStep(),
       // ...
      ]
    }
    
    See more

    Declaration

    Swift

    open class SAPcpmsSecurityPolicyApplyStep : OnboardingStep
  • Undocumented

    See more

    Declaration

    Swift

    public class CrashReportCollectionConsent : DataCollectionConsenting
  • Class that provides localized User Data Collection with Opt-in, and Opt-out alerts available for Usage Data Collection.

    Manages the User Data Collection Consent Handling. The version for each user consent form will be stored in the credentialStore of the OnboardingContext which is used to decide if a newer version of the form should be presented in the next run. If a new version for the form is present, the form will be displayed in the next run to request user confirmation.

    Note: Crash report collection consent and related properties/keys are excluded from visionOS.

    Usage

    Simplest model - default single page forms.
    let dataCollectionConsentStep = DataCollectionConsentStep()
    Creates a localized title and body that will collect user preference for both usage and crash data collection.
    
    Customization model - allow customized single page form.
    let title = "Custom UsageCollectionConsent Title"
    let body = "Custom UsageCollectionConsent Body"
    let dataCollectionConsentStep = DataCollectionConsentStep(title: title, body: body)
    
    Customization model with additional page - allow customized multi page form.
    var spDpPage = UserConsentPageContent()
    spDpPage.title = "Data Privacy Details"
    spDpPage.body = "Your customized data privacy text"
    var spSecPage = UserConsentPageContent()
    spSecPage.title = "Security Details"
    spSecPage.body = "Your customized security text"
    let dataCollectionConsentStep = DataCollectionConsentStep(title: title, body: body, additionalUserPageContent: [spDpPage, spSecPage])
    
    Customization model with additional page(allow customized multi page form) and customized crash report collection consent object.
    var spDpPage = UserConsentPageContent()
    spDpPage.title = "Data Privacy Details"
    spDpPage.body = "Your customized data privacy text"
    var spSecPage = UserConsentPageContent()
    spSecPage.title = "Security Details"
    spSecPage.body = "Your customized security text"
    let crashReportCollectionConsent = CrashReportCollectionConsent(version: <optionally give the version as String>, userConsentPagesContent: [<optionally give array of objects of type UserConsentPageContent>])
    let dataCollectionConsentStep = DataCollectionConsentStep(title: title, body: body, additionalUserPageContent: [spDpPage, spSecPage], crashReportCollectionConsent: crashReportCollectionConsent)
    
    Customization model with customized usage collection consent object and customized crash report collection consent object.
    let usageCollectionConsent = UsageCollectionConsent(version: <optionally give the version as String>, userConsentPagesContent: [<optionally give array of objects of type UserConsentPageContent>])
    let crashReportCollectionConsent = CrashReportCollectionConsent(version: <optionally give the version as String>, userConsentPagesContent: [<optionally give array of objects of type UserConsentPageContent>])
    let dataCollectionConsentStep = DataCollectionConsentStep(usageCollectionConsent: usageCollectionConsent, crashReportCollectionConsent: crashReportCollectionConsent)
    
    User selection will be enacted, and will be published in context.
    Responses can be accessed as follows in AppDelegate onboarded delegate method using default key:
    if let consentForUsage = onboardingContext.info[.usageCollectionConsentResponseInfoKey] {
    or an alternate key if it was set on the step as:
    onboardingContext.info[yourDataCollectionConsentStep.usageConsentResponseInfoKey]
    if let consentForCrash = onboardingContext.info[.crashCollectionConsentResponseInfoKey] {
    or an alternate key if it was set on the step as:
    onboardingContext.info[yourDataCollectionConsentStep.crashConsentResponseInfoKey]
    
    Class also contains both localized and custom usage opt-in and opt-out alerts that may be used to prompt user as needed.
    Intended use for these helper methods:
    
    Obtain current user state: if(Usage.shared.hasConsentForUser(userUUID))
    
    Then call whatever is appropriate for your situation.
    - either opt-out:
    DataCollectionConsentStep.UsageCollectionConsentOptOut(viewController:
    or opt-in:
    DataCollectionConsentStep.UsageCollectionConsentOptIn(viewController:
    
    Default opt-in model called from your app:
    DataCollectionConsentStep.UsageCollectionConsentOptIn(viewController: self) { response in
                                              if response {
                                                  Usage.shared.consentForUser(userUUID, given: response)
                                              }
                                          }
    Customized opt-in model called from your app:
    DataCollectionConsentStep.UsageCollectionConsentOptIn(viewController: self, title: "Custom Opt-in Title", message: "Custom Opt-in Message")
    ...
    
    Default opt-out model called from your app:
    DataCollectionConsentStep.UsageCollectionConsentOptOut(viewController: self) { response in
                                              if response {
                                                  Usage.shared.consentForUser(userUUID, given: !response)
                                              }
                                          }
    Customized opt-out model called from your app:
    DataCollectionConsentStep.UsageCollectionConsentOptOut(viewController: self, title: "Custom Opt-out Title", message: "Custom Opt-out Message")
    ...
    
    See more

    Declaration

    Swift

    open class DataCollectionConsentStep : OnboardingStep, FUIUserConsentViewControllerDelegate
  • Undocumented

    See more

    Declaration

    Swift

    public class UsageCollectionConsent : DataCollectionConsenting
  • Use this class to encode/decode user information

    See more

    Declaration

    Swift

    public class User : FUIUser, Codable
    extension User: Equatable
  • This is the data source for providing the onboarded user list

    See more

    Declaration

    Swift

    public class UserDataSource : FUIMultiUserPasscodeControllerDataSource
  • The default implementation of UseManaging protocol. This class manages users of different UUID()

    See more

    Declaration

    Swift

    public class UserManager : UserManaging