SAPFoundation Reference

The SAPFoundation framework includes components that integrate the application with SAP Mobile Services, including communication, authentication, caching, remote notifications, and so on.

The SAPFoundation APIs on the left are organized into categories based on their functional role. Select a category or component within a category for details.


The SAPFoundation.xcframework depends on the following framework:

  • SAPCommon.xcframework


Add SAPCommon.xcframework and SAPFoundation.xcframework to your Xcode project. Add SAPCommon.xcframework and SAPFoundation.xcframework under Embedded Binaries in the General tab for your project configuration. Your App is now linked to the framework and appears under Link Binary with Libraries and Embeded Frameworks section in the Build Phases tab of your App’s Xcode project settings.

Component Categories

  • Networking – Provides an API around the native URLSession that allows the application to exchange HTTP messages, implement delegates to handle URLSession events, and support other cross-component features such as authentication and logging.
  • Authentication – Provides classes for implementing Basic, one-time password (OTP), OAuth2, and SAML authentication, and includes these Observers:
    • Basic – Use credentials in the form of a user ID and password when making a request.
    • OTP – The password is valid only for one login session or transaction.
    • OAuth2 – Provides OAuth2 functionality to your project as defined in the OAuth 2.0 specification, and allows authentication of users without intercepting any secure workflows. See also Client Authentication with OAuth2.
    • SAML – Provides SAML-enabled registration. Intercepts requests provided by the SAPURLSession, looks for SAML challenge indicating header values, and uses its SAMLAuthenticator to authenticate and resend the request when the SAML challenge is encountered. See also Client Authentication with SAML.
  • Configuration Provider – Provides an onboarding mechanism for an application to retrieve initial configuration data. For example, a configuration provider can retrieve the parameters (server URL; port number) required to connect to a backend service.
  • Log Upload – Upload persisted logs to SAP Mobile Services. See also Uploading and Viewing Client Logs.
  • Remote Notifications – Enables a device to receive a token from an Apple Push Notification service (APNs) server and send that token to SAP Mobile Services that subsequently pushes notifications through APNs. See also Configuring Push Notifications.
  • Cache – Provides limited local capacity for information that requires quick access for enhanced application performance. See also Performance.
  • Secure Store – Provides transparent 256-bit AES encryption of data stored either in a SQLite database or a persistent key-value-store. See also Security.
  • Settings – Use the SAPcpmsSettings API to read and modify application-related SAP Mobile Services settings.
  • Network Communication – Allows registration of listeners that are informed about connection status changes. A device’s Internet connection status may change frequently, and applications usually have to react to these changes by starting a background synchronization with the back-end or perhaps switching to offline mode. Additionally, the framework can manually check whether the device is connected to the Internet, for example via WiFi, and if a host can be reached.
  • Client Usage – Collects, stores, and uploads client usage events to SAP Mobile Services for analysis of usage patterns including amount of time the app is in use, which screens are accessed, which actions are taken by the app user, and so on.
  • User Roles – Loads information (name, id, roles) about the current user from SAP Mobile Services.
  • Destinations – Loads the configured destination name(s) and path(s) from SAP Mobile Services.
  • Client Resources – Downloads client resources from SAP Mobile Services.
  • Cipher – Provides an encrypting / decrypting interface for the application.
  • Feedback - Provides an uploader for Feedback objects (a component from the SAPCommon module).