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.
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¶
-
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.- To know more about how you can brand your app, see Branding Your Customized App.
-
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.
-
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 theMDKProject.json
file. -
Navigate to the app name folder, in
MDClient_SDK
. Entertns build <device>
. tns build android
for Android-
tns build ios for
iOS -
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 thetns run ios --emulator
command. -
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 thetns 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 thetns device android
command. You can find the value of the device identifier by attaching the device to your Mac system and running thetns device ios
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.