Skip to content

Creating Custom Clients

Build and run the Mobile Development Kit client to connect to your SAP Cloud Platform mobile application. You can also package your app so that it can be posted to the Apple App Store, iOS Enterprise App Store or Google Play.

Prerequisites

Before building your Mobile Development Kit client, you must install the SDK dependencies.

For Android development, go back to the zip file that you downloaded from Software downloads, MDK_SDK-<version number>-Universal.zip and browse to the MDKClient_SDK.zip and extract it to a local folder. Navigate to that folder and open a command prompt. Run .\install.cmd.

For iOS development, use terminal or finder to run the .\install.command.

The create-client.command file appears in the SDK directory.

Procedure

  1. Modify the MDKProject.json and BrandedSettings.json files to specify information like application connection, passcode policy settings, application icon, and so forth. It is recommended that you copy the template.mdkproject folder to another location to use it for future builds. Retain the .mdkproject extension to prevent the create-client script from failing.

  2. Place your app definition files in the application.definitions folder. If you do not have a default bundled app, a script is provided to generate an app from your application definitions.

  3. Create the SDK client by running the ./create-client.command command. You must provide the path to a valid .mdkproject directory.

    Note

    To get help on using the create-client command, run ./create-client.command -h .

    A new folder with the same name as the value set for AppName in the MDKProject.json file.

  4. Navigate to the app name folder, in MDClient_SDK. Enter tns build <device>.

  5. tns build android for Android
  6. tns build ios for iOS

  7. To run the app on an Android emulator, use the tns run android --emulator command. Make sure that you have created a virtual device in Android Studio prior to running this command. To run the app on the iOS Simulator, use the tns run ios --emulator command.

  8. To run the app on an Android device, use the tns run android --device <device identifier> command. To run the app on an iOS device, use the tns run ios --device <device identifier> command You can find the value of the device identifier by attaching the device to your Windows system and running the tns device android command. You can find the value of the device identifier by attaching the device to your Mac system and running the tns device ios command.

  9. See Building Custom Client For Release for details on how to build and package client for release.

Tutorial

Build Your Mobile Development Kit Client.


Last update: October 20, 2020