Skip to content

Shared Devices Support

Introduction

The SDK frameworks support the onboarding of multiple users in the same native application where the pending changes from previous users are allowed to be uploaded even after the user switch. Developers can either use SAP BTP SDK Assistant for iOS to enable the Shared Devices feature, or the administrator can enable the feature in the mobile services cockpit

Procedure

Use this page to configure Shared Devices from SAP BTP SDK Assistant for iOS.

Project configuration

Go to the mobile services cockpit and select your app from the app list. Click Mobile Settings Exchange in the assigned features list.

Project configuration

Verify that the Allow Upload of Pending Changes from Previous User (Enable Multiple User Mode) flag under the Shared Devices section of Mobile Settings Exchange feature is enabled.

Project configuration

Offline Conflict Handling in Multi-User Mode

When multiple users share the same device, offline data conflicts can occur when a new user logs in before the previous user's pending transactions are resolved. The SDK lets you configure how these conflicts are handled.

Configuring Offline Conflict Handling

Go to the mobile services cockpit, choose your app from the list, and navigate to the Client Settings section within` Settings. Verify that the Allow Upload of Pending Changes from Previous User (Enable Multiple User Mode) flag is enabled, because it is required for offline conflict handling to take effect. Then enable the Offline Conflict Handling in Multi User Mode checkbox.

Offline Conflict Handling Setting

Once offline conflict handling is enabled, select one of the following conflict resolution modes:

  • Discard Previous Transactions — Deletes the previous logged-in user's pending changes from the local request queue when a new user logs in. This action is logged, and the current user is notified upon successful deletion before proceeding with the application. Note that this results in permanent data loss of any pending transactions from the previous user.

  • Discard Pending Transactions After Upload — When a new user logs in, the previous user's offline request queue database is uploaded to mobile services cockpit for inspection. The previous user's pending transactions on the device are discarded after the upload is complete. Application access for the new user is blocked until the upload finishes.

Behavior by Configuration

offlineConflictHandlingEnabled offlineConflictHandlingMode Result
Unchecked / absent offlineConflictHandlingEnabled = false, offlineConflictHandlingMode = nil — conflict handling skipped
Checked Discard Previous Transactions The previous logged-in user's request queue is deleted locally. User notified. The application proceeds.
Checked Discard Pending Transactions After Upload When a new user logs in, the previous user's offline request queue database is uploaded to mobile services cockpit for inspection. Pending changes on the device are discarded after the upload is complete. The application is blocked until the upload is successfully completed. User notified.

Accessing the Settings in Your App

After a successful onboarding or restore flow, the offline conflict handling configuration is available through the SAPcpmsSharedDeviceSettings object in the flow context. The SAP BTP SDK for iOS exposes the configured mode, so your application can handle accordingly.

if let sharedDeviceSettings = context.info[.sapcpmsSharedDeviceSettings] as? SAPcpmsSharedDeviceSettings,
   sharedDeviceSettings.offlineConflictHandlingEnabled,
   let conflictHandlingMode = sharedDeviceSettings.offlineConflictHandlingMode {

    switch conflictHandlingMode {
    case .discardPreviousTransactions:
        // handle discard
    case .discardPendingTransactionsAfterUpload:
        // handle upload to request quene
    @unknown default:
        break
    }
}

Note: The application can read the value configured in mobile services cockpit through offlineConflictHandlingMode.

Generated App

The generated client application from the SAP BTP SDK Assistant for iOS that has the Allow Upload of Pending Changes from Previous User (Enable Multiple User Mode) flag enabled in mobile services cockpit provides complete create-read-update-delete (CRUD) access to the OData service data behind the selected app of the mobile services cockpit. It includes the Fiori logon screens for onboarding as well as the OData and Foundation libraries that are used to consume the service.

The generated client app will have the code required to support multi-user mode, including a User Mode key in the AppParameters.plist with the value, Multiple.

    <key>User Mode</key>
    <string>Multiple</string>

Onboarding Flow

The onboarding process is the same as for single-user mode, except that no biometric authentication screen is shown. This feature is supported for OAuth2, SAML, Basic, or no authentication.

After authentication, each user of the app receives the client-side configuration policy from the mobile services cockpit containing the required passcode policy. If the app requires passcode protection, then the Create Passcode and Verify Passcode screens are displayed.

Passcode screen

After a passcode is created, the logon flow is complete. The app then displays the entity set list.

After onboarding, if the app is put in the background and brought back, in multi-user mode there will now be a Switch or Add User button at the bottom of the screen.

User_screen

When the user clicks the button, the user list is displayed. The user can either select an existing user from the list or click the ADD USER icon at the top right of the screen. This will start the onboarding process for the new user.

User_screen


Last update: April 27, 2026