Skip to Content

The latest release of SAP Cloud Platform Mobile Services, mobile development kit is available.  The Editor will update automatically for you in SAP Web IDE Full Stack.  However, you will need to download the new mobile development kit SDK client, and configure the client to connect to your mobile services MDK application.

The mobile development kit (MDK) client has simplified the install and setup process.  For more information on that and other new features, check out my What’s New in MDK 2.0SP1 blog.

 

I’ve created this quick blog so that people like me don’t need to read the README file in the MDK SDK download. We are also working on an updated SAP HANA Academy MDK Client Setup video which will be available soon. I’ll update this blog and provide a link once available.

 

You can download the updated client SDK from the SAP Marketplace and extract the file. Once extracted, you will see the following folder structure. In the screenshot below, I have extracted MDKClient_SDK.zip into the same folder.

 

 

MDK Dependencies Installer

 

The MDK Dependencies Installer is exactly what it sounds like.  It checks the status of the MDK dependencies and will install or upgrade the dependencies for you.

 

Open the MDK Dependencies Installer application.

 

Note: You may get the following error.

 

If you get the above error, go to System Preferences -> Security & Privacy and click Open Anyway.

 

Now the MDK Dependencies Installer should open. Select the components you want the application to install and select Install Selected Components.

 

 

 

 

Install MDK Client

 

Once the dependencies are installed, you can install the MDK Client. Unzip MDKClient_SDK.zip if it is not already extracted.  From a terminal window (setting your proxy if needed before running), navigate to the [path] -> MDKClient_SDK folder and execute ./install.command

 

 

Create your .mdkproject folder

While the install.command command is running, you can make a copy of the template.mdkproject folder and rename it [whateveryouwant].mdkproject.

 

 

You can put your new folder anywhere you want.  I have named my .mdkproject folder demoapp.mdkproject and put it outside of the MDK Client folder structure. I will refer this name for the rest of the blog.

 

 

Go into the demoapp.mdkproject folder.  You will need to update the BrandedSettings.json and MDKProject.json files as needed for your client.

 

  • Go into the demoapp.mdkproject folder

 

 

Open the MDKProject.json file and update it as needed. I have updated the file as seen below in the screenshot.

 

Now open the BrandedSettings.json file and update it with information from your MDK Mobile Services application.

 

To find the correct URLs for your client, you should go to Mobile Services and find your MDK application that you want to link to this client.  Click on Security from the MDK app main page, then click on the OAuth link.

 

  • AppID -> ID from App info page
  • Client ID -> Client ID from OAUTH Client page
  • SapCloudPlatformEndpoint -> Server URL from App API page
  • AuthorizationEndpointUrl -> Authorization Endpoint from OAuth Client page
  • RedirectUrl -> Redirect URL from OAuth Client page
  • TokenUrl -> Token Endpoint from OAuth Client page

 

 

Create Client

Now that the install.command process has completed,  you should now have a create-client.command in the MDKClient_SDK folder.

  • Run create-client.command

 

  • Now you will need to provide the path to demoapp.mdkproject (or whatever you named it).

  • Now specify whether you are building a client for a device or simulator.

 

Once the create-client.command process completes, you will find your app created under the MDKClient_SDK folder.  This name of this folder is based on the <App Name> provided in the MDKProject.json file. In the screenshot with the MDKProject.json, I named the app Mobile Dev Kit.

 

In a terminal window, navigate into the Mobile Dev Kit folder and run tns run ios — emulator.

At the end of this command, the Mac should open a simulator with a welcome screen for the MDK application.

  • Click on Start.
  • Login to SAP Cloud Platform with your mobile services login details.
  • Follow the remaining prompts.
  • Deploy an application from the MDK editor in SAP Web IDE to view it in your MDK Client.
To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply