Other Classes

The following classes are available globally.

  • An observer which is responsible for obtaining the attestation token from SAP Mobile Services and adding it to each request header before being sent. The class also refreshes the token when the token expires.

    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

    Use this observer by simply adding it to a SAPURLSession

    do {
        // Create an instance of `AttestationService` using the initializer.
        let service = try AttestationService(sapCpmsSettingsParameters: settingsParameters,
                                         sapUrlSession: urlSession, store: persistentStore, attestationSettings: settings)
        // Create an instance of `AttestationObserver` using the service.
        let observer = AttestationObserver(attestationService: service)
        sapURLSession.register(observer)
    } catch {
        //catch error
    }
    
    See more

    Declaration

    Swift

    public class AttestationObserver
    extension AttestationObserver: SAPURLSessionObserving
  • This class is responsible for Application attestation and assertion with Apple. It also validates the results with SAP Mobile Services, establishing the legitimacy of an application.

    To be able to use this class App Attest should be supported on the Apple device.

    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.

    See more

    Declaration

    Swift

    public class AttestationService
  • Undocumented

    See more

    Declaration

    Swift

    public class AuxiliaryDataRequestManager
  • Undocumented

    See more

    Declaration

    Swift

    public class AuxiliaryCommunicationProvider : AuxiliaryCommunicationProviding
  • Undocumented

    See more

    Declaration

    Swift

    public class AuxiliaryDataContainer<T> : AuxiliaryDataContainerRepresenting, Codable where T : Decodable, T : Encodable
  • Undocumented

    See more

    Declaration

    Swift

    public class AuxiliaryDataRequest<T> : AuxiliaryDataRequestRepresenting, Codable where T : Decodable, T : Encodable
  • Undocumented

    See more

    Declaration

    Swift

    public class AuxiliaryKeyContainer<T> : AuxiliaryKeyContainerRepresenting where T : Decodable, T : Encodable, T : Hashable
  • A type that can be passed in to the DigitalSignatureVerifying protocol for specifying values useful in the signature verification.

    See more

    Declaration

    Swift

    public class DigitalSignatureParameter
  • This class implements DigitalSignatureVerifying and does the digital signature verification of the passed data.

    See more

    Declaration

    Swift

    public class DigitalSignatureVerifier
    extension DigitalSignatureVerifier: DigitalSignatureVerifying
  • This observer checks for the response header x-app-version-inactive denoting if the current application version is active or not in mobile services and stops user from onboarding if the version is inactive.

    To enable this functionality you need to register this observer to an SAPURLSession instance.

    This is an example for a typical usage of the observer:

    let urlSession: SAPURLSession = <#SAPURLSession instance#>
    
    let applicationVersionObserver = ApplicationVersionObserver()
    urlSession.register(applicationVersionObserver)
    
    See more

    Declaration

    Swift

    open class ApplicationVersionObserver : SAPURLSessionObserving
  • Observer which performs necessary steps for API Key authentication

    See more

    Declaration

    Swift

    open class APIKeyAuthenticationObserver
    extension APIKeyAuthenticationObserver: SAPURLSessionObserving
  • Default implementation of APIKeyCredentialDiscovery

    See more

    Declaration

    Swift

    public class DefaultAPIKeyCredentialDiscovery : APIKeyCredentialDiscovery
  • Undocumented

    See more

    Declaration

    Swift

    public class DispatcherFactory
  • Use this class to broadcast your UISceneDelegate’s methods among the registered components.

    See more

    Declaration

    Swift

    public class SceneDelegateDispatcher : EventDispatching
  • A singleton class which manages scenes in Multi-window scenario.

    See more

    Declaration

    Swift

    public class SceneManager
  • Undocumented

    See more

    Declaration

    Swift

    public class DefaultSAPWKUIDelegate : NSObject, WKUIDelegate
  • The default implementation of SAPPassportManaging protocol. This default implementation adheres to the standards mentioned for “metering” use-case by default. Users may choose to override the relevant methods to get/set passport fields differently and also to change the manager behavior in general.

    See more

    Declaration

    Swift

    public class MeteringPassportManager : SAPPassportManaging
  • Undocumented

    See more

    Declaration

    Swift

    public class Passport
  • This observer is responsible to set SAP Passport header for metering. This includes the SAP-PASSPORT header field, which are added to each HTTP request of the SAPURLSession.

    To enable this functionality you need to register this observer to an SAPURLSession instance.

    This is an example for a typical usage of the observer:

    let urlSession: SAPURLSession = SAPURLSession instance
    
    let passportObserver = SAPPassportObserver( )
    urlSession.register(passportObserver)
    
    See more

    Declaration

    Swift

    open class SAPPassportObserver : SAPURLSessionObserving
  • API to enforce a ClipboardAccessPolicy

     try ClipboardProtectionEnforcer.shared.enforce(policy: .blocked)
    
     // ... during this time copied values cannot be pasted to other apps
    
     try ClipboardProtectionEnforcer.shared.enforce(policy: .unrestricted)
    
    See more

    Declaration

    Swift

    public class ClipboardProtectionEnforcer
  • APIs to detect if device is compromised

    See more

    Declaration

    Swift

    @available(iOSApplicationExtension, unavailable)
    public class DeviceComplianceChecker
  • Undocumented

    See more

    Declaration

    Swift

    public class SAPcpmsDeviceSecurityAuditUploader
  • Usage

     try OpenURLPolicyEnforcer.shared.enforce(policy: .blocked)
    
     // ... now URLs can not be opened in an external application.
    
    
    See more

    Declaration

    Swift

    public class OpenURLPolicyEnforcer
  • Usage

     try PrintPolicyEnforcer.shared.enforce(policy: .blocked)
    
    
    See more

    Declaration

    Swift

    public class PrintPolicyEnforcer
  • Undocumented

    See more

    Declaration

    Swift

    public class AuxiliarySecurityManager
  • Undocumented

    See more

    Declaration

    Swift

    public class SecurityManager
  • Undocumented

    See more

    Declaration

    Swift

    public class CryptoProviderUtil
  • class to load the encryption configuration for a given appId and deviceId

    See more

    Declaration

    Swift

    public class EncryptionConfigLoader
  • A class designed to handle the Telemetry Services. It is capable of managing the session start and end events, handling the custom telemetry events and uploading telemetry events data to a remote server.

    This class follows the Singleton pattern, ensuring a single global instance. To store a custom event, access the API like this

    Example Usage: swift TelemetryService.shared.storeCustomEvent(key: <#T##String#>, date: <#T##Date#>, duration: <#T##Double?#>)

    See more

    Declaration

    Swift

    @objc(SAPBTPSDKTelemetryService)
    public class TelemetryService : NSObject
    extension TelemetryService: UserEventObserving
  • Undocumented

    See more

    Declaration

    Swift

    public class SAPCrashReporter
    extension SAPCrashReporter: SAPCrashReporting
  • A class to dispatch the user events to store observers of type UserEventObserving. It also provides the capability to add and remove observers. These registered observers will receive notifications for user-related events, including user added and user switch.

    See more

    Declaration

    Swift

    public class UserEventDispatcher : EventDispatching
  • Undocumented

    See more

    Declaration

    Swift

    public final class SAPFoundationUtils