Skip to content

Creating Custom Clients

Build and run the Mobile Development Kit client to connect to your SAP Business Technology 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.

  1. Download the Mobile Development Kit SDK either from the SAP community download page or SAP Software Center.

  2. Extract the downloaded zip file on your machine.

  3. Run Mobile Development Kit Dependencies Installer to check the status of the Mobile Development Kit dependencies. In case of any missing dependencies, install it first and then re-run the installer to verify the status.

    • macOS:

      • Double-click MDK Dependencies Installer.app file, click Open. You may need to grant admin access via Privileges app.
      • Enter Admin user password and click OK. 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. > If you find some issues (for example: app can't 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.
    • Windows:

      • Extract MDKDependenciesInstallerWindows zip file.
      • Navigate to the extracted folder and double-click the MDK_Dependencies_Installer application file to open it. The installer will list all required components for Android platform and automatically check if they are already installed in the machine. Follow the installer UI to install the components you selected.

    Once you’ve installed these prerequisites, your machine is ready to generate and build an Mobile Development Kit client project.

  4. To use the SDK to generate a Mobile Development Kit client, the first step is to set up the SDK to create a client. extract MDKClient_SDK.zip to a local folder.

    • macOS:

      • From a terminal window, navigate to the [path] -> MDKClient_SDK folder and execute ./install.command. If everything is fine, you will a success message in the console followed by next steps. You will notice that the create-client.command file has appeared in the SDK directory.
    • Windows:

      • From a command line window, navigate to the [path] -> MDKClient_SDK folder and execute install.cmd. Once this completes, close the window. You will notice that the create-client.cmd file has appeared 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. Set up the rest of your .mdkproject based on your custom client requirements, refer to Branding Your Customized App for more details.

  3. Create the client on

    • macOS:
    • You can create a client by running ./create-client.command, follow the prompts and provide the path to your .mdkproject directory. If you want to include source map of the built-in metadata to the generated client project, specify this argument to create-client command script. --include-source-map

    • Once the create-client.command script executed successfully, you will see Application ready message in terminal console. You will find your Mobile Development Kit Client app (a new folder with the same name as the value set for AppName in the MDKProject.json file).

    Note

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

    • You can run the create-client.command from any directory. The resulting client project will be created in the directory where the create-client command is run from.

  4. Windows:

    • You can create a client by running ./create-client.cmd, follow the prompts and provide the path to your .mdkproject directory. If you want to include source map of the built-in metadata to the generated client project, specify this argument to create-client command script. --include-source-map

    Note

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

    You can run the create-client.cmd from any directory. The resulting Mobile Development Kit 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. You will find your Mobile Development Kit Client app (a new folder with the same name as the value set for AppName in the MDKProject.json file).

  5. Navigate to your client folder.

    • To run the app on an
      • Android device, use the tns run android --device <device identifier> command. You can find the value of the device identifier by attaching the device to your machine and running the tns device android command.
      • 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.
      • 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 Mac system and running the tns device ios command.
      • iOS Simulator, use the tns run ios --emulator command.

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: April 8, 2022