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.
-
Download the Mobile Development Kit SDK either from the SAP community download page or SAP Software Center.
-
Extract the downloaded zip file on your machine.
-
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.
- Double-click
-
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.
- Extract
Once you’ve installed these prerequisites, your machine is ready to generate and build an Mobile Development Kit client project.
-
-
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 thecreate-client.command
file has appeared in the SDK directory.
- From a terminal window, navigate to the
-
Windows:
- From a command line window, navigate to the
[path] -> MDKClient_SDK
folder and executeinstall.cmd
. Once this completes, close the window. You will notice that thecreate-client.cmd
file has appeared in the SDK directory.
- From a command line window, navigate to the
-
Procedure¶
-
Modify the
MDKProject.json
andBrandedSettings.json
files to specify information like application connection, passcode policy settings, application icon, and so forth. It is recommended that you copy thetemplate.mdkproject
folder to another location to use it for future builds. Retain the.mdkproject
extension to prevent the create-client script from failing. -
Set up the rest of your
.mdkproject
based on your custom client requirements, refer to Branding Your Customized App for more details. -
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 forAppName
in theMDKProject.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.
-
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 forAppName
in theMDKProject.json
file). - You can create a client by running
-
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 thetns 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 thetns device ios
command. - iOS Simulator, use the
tns run ios --emulator
command.
- Android device, use the
- To run the app on an
See Building Custom Client For Release for details on how to build and package client for release.
Tutorial¶
Build Your Mobile Development Kit Client.