🎓intermediate⏱25 min.Mobile Development Kit ClientIntermediateIosAndroidMobileSAP Business Technology PlatformSAP Mobile ServicesSAP Build CodeSAP Build
You will learn
โHow to install a mobile development kit client SDK on Mac and Windows OS
โHow to build a branded mobile development kit client for iOS and Android
โHow to connect to SAP Mobile app There are 3 options for mobile development kit client: 1. Install the SAP Mobile Services client from the public store which is meant for demo and development or learning purposes 2. Use the Cloud Build feature in SAP Mobile Services to generate a MDK client 3. Build a client on your local machine in your organization development environment using MDK SDK
Download the latest version of mobile development kit SDK either from the SAP community trial download or SAP Software Center if you are a SAP Mobile Services customer
In this tutorial, you will learn creating a MDK client using option 3.
For distribution to your users, you need to build a custom client. This enables you to:
Provide customer app icon
Use your signing profiles
Distribute custom extensions
Provide app-specific settings (Custom EULA texts, Add app assets)
Add demo mode
Customize languages (for onboarding screens)
Use your own distribution channels, like the mobile device management of your choice
Step 1Run MDK Dependencies Installer
โ
Make sure you are choosing the right development platform tab above.
Make sure that you have download latest version of MDK SDK as described in Prerequisites.
Extract the downloaded zip file on your Mac. You will see following Files and Folders in the extracted folder.
MDK
If you are running an Intel Mac, use the MDK Dependencies Installer-x86. If you are running a Mac with an M1,M2, or M3 chip, use the MDK Dependencies Installer-arm64. Both installers are available at the root of the extracted MDK SDK folder to start the installation.
MDK
If you find some issues (for example: app cant be opened because the identity of the developer cannot be confirmed) while opening this file, go to System Preferences > Security & Privacy and click Open Anyway.
Enter Admin user password and click OK.
MDK
The installer will list all required components for iOS and Android platform and automatically check if they are already installed in the machine. Follow the installer UI to install the components you selected.
MDK
You might see different software versions depending on MDK SDK version you are using.
You can look into console by clicking Show Log for execution of each dependencies.
Extract the downloaded zip file on your Windows machine. You will see following Files and Folders in the extracted folder.
MDK
At the root of the extracted MDK SDK folder, extract MDKDependenciesInstallerWindows.zip file, by default a new folder MDK Dependencies Installer-win32-ia32 will be created. Enter the new folder and double click MDK_Dependencies_Installer.exe to start installer.
MDK
The installer will list all required components for Windows platform and automatically check if they are already installed in the machine. Follow the installer UI to install the components you selected.
MDK
If you encounter any issue while running the MDK Dependencies Installer then have a look at this troubleshooting guide.
You might see different software versions depending on MDK SDK version you are using.
You can look into console by clicking Show Log for execution of each dependencies.
Once you’ve installed these prerequisites, your machine is ready to generate and build an MDK project.
Step 2Installing the SDK dependencies
+
Make sure you are choosing the right development platform tab above.
To use the SDK to generate a mobile development kit client, the first step is to install some dependencies.
Unzip MDKClient_SDK.zip if it is not already extracted.
MDK
Invoke install.command either from Terminal or from Finder. From a terminal window, navigate to the [path] -> MDKClient_SDK folder and execute ./install.command. A terminal window will appear installs the SDK dependencies using NPM.
MDK
Once this completes, you will a success message in the console followed by next steps.
MDK
If you select the command from Finder, you may see the following message:
“install.command” can’t be opened because it is from an unidentified developer. Your security preferences allow installation of only apps from the App Store and identified developers. To get around this, navigate to the Security & Privacy section of System Preferences. This can be found using Spotlight. Near the bottom of this dialog, click the Open Anyway button on the right side. Then select Open from the next prompt.
Notice that the create-client.command file has appeared in the SDK directory.
MDK
To use the SDK to generate a mobile development kit client, the first step is to install some dependencies.
Unzip MDKClient_SDK.zip if it is not already extracted.
MDK
Invoke install.cmd from a command line window, navigate to the [path] -> MDKClient_SDK folder and execute install.cmd. A terminal window will appear installs the SDK dependencies using NPM.
MDK
MDK
Once this completes, you will a success message in the console followed by next steps.
MDK
Notice that the create-client.cmd file has appeared in the SDK directory.
MDK
Step 3Create your .mdkproject folder
+
Make sure you are choosing the right development platform tab above.
In the MDKClient_SDK folder, you will find the template.mdkproject folder.
MDK
It is recommended that you copy this folder to another location so that you can to use it for future builds. Copy and paste it anywhere, and then rename template to DemoSampleApp.mdkproject.
MDK
Next, you will need to update the BrandedSettings.json and MDKProject.json files as needed for your client. Go into the DemoSampleApp.mdkproject folder.
MDK
Open the MDKProject.json file and update it as needed. This file has some build-time configurations such as the application name, version and bundle ID.
MDK
AppDisplayName: This is the name of the application on the home screen of the device.
AppName: This is the name of the folder where the client is created.
AndroidVersionCode: The Android application version code. It accepts value ‘Auto’ or any positive integer value. If it is not defined, the default version code will be 1. For more details, Android Application Version Code.
BaseProject: The sub-directory of metadata where the project is found. For this tutorial, you don’t have any subfolder under metadata, you can either keep it as it is or remove it completely.
BundleID: It should be a unique identifier for your application. This controls if the client can be installed side by side with other applications on the device. Two applications with the same Bundle ID cannot be installed at the same time on a device. For iOS this is the Identifier (AppID) that is registered in Apple Developer account since that determines if the application can be installed alongside other applications. If the XCode project is set up to use Automatically manage signing then when building, XCode will automatically generate a signing profile for the specified bundle id. Without matching them, trying to run the custom client in iOS device will result in failure. In Android, it is known as application ID.
UrlScheme: Allows you to specify a custom URL scheme which opens the client. The default is mdkclient. This value also needs to be unique across applications on your device. If the value is not unique the wrong application may be referenced when redirecting.
You can find more details about configuration of MDKProject.json file in this help documentation.
Now, open the BrandedSettings.json and provide ApplicationDisplayName name. This name will appear on the Welcome screen in your branded MDK client.
MDK
To update the AppId, ClientId, ServerUrl, AuthorizationEndPointUrl, RedirectUrl and TokenUrl in the ConnectionSettings block, navigate to the Mobile Services admin UI, click myapp.mdk.demo > Client Settings > Info tab, copy the highlighted block and paste it in BrandedSettings.json.
MDK
MDK
Regarding other properties:
Debug settings: The settings in the DebugSettings property are for development use and should not be enabled in a production setting.
Log Settings: Set this to the log level to be used when the client is launched.
Demo: If you want to access the app in the demo mode, you can configure required settings.
If you are connecting to AliCloud accounts, you will also need to add your custom domains underย URLWhitelist property in the same file. You can find more details in documentation.
In the last section of BrandedSettings.json file, make these changes and save the file:
Field
Value
DetailLabelViewText
My first branded client using MDK SDK
SigninButtonText
Start
MDK
In the MDKClient_SDK folder, you will find the template.mdkproject folder.
MDK
It is recommended that you copy this folder to another location so that you can to use it for future builds. Copy and paste it anywhere, and then rename the template to DemoSampleApp.mdkproject.
MDK
Next, you will need to update the MDKProject.json and BrandedSettings.json files as needed for your client. Go into the DemoSampleApp.mdkproject folder.
MDK
Open the MDKProject.json file and update it as needed. This file has some build-time configurations such as the application name, version, bundle ID and few others.
MDK
AppDisplayName: This is the name of the application on the home screen of the device.
AppName: This is the name of the folder where the client is created.
BundleID: It should be a unique identifier for your application. This controls if the client can be installed side by side with other applications on the device. Two applications with the same Bundle ID cannot be installed at the same time on a device.
URLScheme: Allows you to specify a custom URL scheme which opens the client. The default is mdkclient. This value also needs to be unique across applications on your device. If the value is not unique the wrong application may be referenced when redirecting.
You can find more details about configuration of MDKProject.json file in this help documentation.
Now, open the BrandedSettings.json and provide ApplicationDisplayName name. This name will appear on the Welcome screen in your branded MDK client.
MDK
To update the AppId, ClientId, ServerUrl, AuthorizationEndPointUrl, RedirectUrl and TokenUrl in the ConnectionSettings block, navigate to the Mobile Services admin UI, click myapp.mdk.demo > Client Settings > Info tab, copy the highlighted block and paste it in BrandedSettings.json.
MDK
MDK
Regarding other properties:
Debug settings: The settings in the DebugSettings property are for development use and should not be enabled in a production setting.
Log Settings: Set this to the log level to be used when the client is launched.
Demo: If you want to access the app in the demo mode, you can configure required settings.
If you are connecting to AliCloud accounts, you will also need to add your custom domains underย URLWhitelist property in the same file. You can find more details in documentation.
In the last section of BrandedSettings.json file, make these changes and save the file:
Field
Value
DetailLabelViewText
My first branded client using MDK SDK
SigninButtonText
Start
MDK
Step 4Create the MDK Client
+
Make sure you are choosing the right development platform tab above.
Run ./create-client.command to create the client. You will be asked to provide the path to the .mdkproject file. You can also provide optional arguments such as output directory and log verbosity. You can run create-client.command --help to find out how to specify these options as arguments.
MDK
You can run the create-client command from any directory. The resulting MDK client will be created in the directory where the create-client command is run from.
You will be asked whether you would like to build for iOS or Android or All?
MDK
All option was chosen in this tutorial as you will learn how to create the MDK client for iOS and Android.
Once the create-client.command script executed successfully, you will see Application ready message in terminal console.
MDK
You will also find your MDK Client app created under the MDKClient_SDK folder.
MDK
Run ./create-client.cmd to create the client. You will be asked to provide the path to the .mdkproject file. You can also provide optional arguments such as output directory and log verbosity. You can run create-client.cmd --help to find out how to specify these options as arguments.
MDK
You can run the create-client cmd from any directory. The resulting MDK client will be created in the directory where the create-client command is run from.
Once the create-client.cmd script executed successfully, you will see Application ready message in terminal console.
MDK
MDK
You will also find your app created under the MDKClient_SDK folder.
MDK
This name of this folder is based on the <App Name> provided in the MDKProject.json file and this is the MDK client application generated project.
Step 5Run the MDK Client
+
Make sure you are choosing the right device platform tab above.
In this step, you will run your branded MDK client on an Android emulator. Before trying to launch the client on Android emulator, make sure that you have already configured a virtual device (Android Studio>Virtual Device Manager). Otherwise, you may get an error like No emulator image available for device identifier. In terminal or command line window, navigate to the app name folder DemoSampleApp (in MDClient_SDK path) and use tns run android --emulator command to run the MDK client on the Android emulator.
MDK
To run the MDK client on Android device, first attach your device to your machine. Then run tns device android command to print a list of attached devices. Copy the Device Identifier value for your device.MDKMake sure Developer option and USB debugging option is enabled in android device. Then run tns run android --device <device identifier> command to launch the MDK client on your Android device.MDK
Once, above command gets successfully executed, you will see new MDK client up and running in Android simulator.
Tap Agree on End User License Agreement.
MDK
In Welcome screen, you will notice that app name, detailed label text and signing button text have been updated as per changes done in step 3. Tap Start to connect MDK client to SAP Business Technology Platform (BTP).
MDK
Enter your BTP E-Mail, ID or Login Name to continue.
MDK
Enter your password to login to SAP Business Technology Platform (BTP). If you see an Universal ID screen, enter your Universal ID password.
MDK
Choose a passcode with at least 8 characters for unlocking the app and tap Next.
MDK
Confirm the passcode and tap Done.
MDK
Optionally, you can enable biometric authentication to get faster access to the app data. Please note that if your MDK client is multi-user enabled, you won’t see the biometric screen.
MDK
Tap Next. If you want your MDK client to send you notifications, tap Allow, otherwise, tap Don’t allow.
MDKMDK
If there is any app metadata already deployed to Mobile Services, you will see New Version Available! dialog box otherwise you will see a screen with next steps.
MDK
You can always interrupt running process in terminal window by pressing control + C.
To build an APK for an Android device, use tns build android --release. More information about archiving can be found in NativeScript documentation here.
In this step, you will run your branded MDK client on an iOS simulator. In terminal window, navigate to the app name folder DemoSampleApp (in MDClient_SDK path) and use tns run ios --emulator command to run the MDK client on the iOS simulator.
MDK
To run the MDK client on iOS device, first attach the device to your Mac. Then run tns device ios command to print a list of attached devices. Copy the Device Identifier value for your device.MDKThen run tns run ios --device <device identifier> command to launch the MDK client on your iOS device.MDK
You can also Run the Project in Xcode. Open the project in Xcode with the command open platforms/ios/<app name>.xcworkspace, or open the workspace using the File -> Open... dialog in Xcode. Configure the application’s code signing settings, then Run the project for the target device.
Once, above command gets successfully executed, you will see new MDK client up and running in iOS simulator.
Tap Agree on End User License Agreement.
MDK
In Welcome screen, you will notice that app name, detailed label text and signing button text have been updated as per changes done in step 3. Tap Start to connect MDK client to SAP Business Technology Platform (BTP).
MDK
Enter your BTP E-Mail, ID or Login Name to continue.
MDK
Enter your password to login to SAP Business Technology Platform (BTP). If you see an Universal ID screen, enter your Universal ID password.
MDK
Choose a passcode with at least 8 characters for unlocking the app and tap Next.
MDK
Confirm the passcode and tap Done.
MDK
Optionally, you can enable biometric authentication to get faster access to the app data. Please note that if your MDK client is multi-user enabled, you won’t see the biometric screen.
MDK
If there is any app metadata already deployed to Mobile Services, you will see New Version Available! dialog box otherwise you will see a screen with next steps.
MDK
You can always interrupt running process in terminal window by pressing control + C.
To build an IPA for an iOS device, use tns build ios --for-device --release. This can also be accomplished in Xcode by opening the workspace and selecting the Archive option. More information about archiving can be found in Apple’s documentation here.
Share feedback on this tutorial or join the conversation in SAP Community.
Submit detailed feedbackDiscuss in Community
Steps
Step 1 of 5
1. Run MDK Dependencies Installer2. Installing the SDK dependencies3. Create your .mdkproject folder4. Create the MDK Client5. Run the MDK Client
Joule
AI Notice
Joule is an AI assistant. Generative AI may produce inaccurate, incomplete, or biased information. Always verify important details before acting on them.
Conversations are sent to SAP-hosted large language models for processing. Do not include personal data, credentials, or confidential information in your messages.
Joule's responses are based on the SAP tutorial catalog and may not reflect the latest product changes. For authoritative guidance, consult the linked tutorials and official SAP documentation.