cancel
Showing results for 
Search instead for 
Did you mean: 

How to determine MDK client version in metadata?

michaelhaydock
Participant
0 Kudos
577

Is there a way to use getVersionInfo() to determine MDK client version at runtime in metadata?

Thanks,

Michael

Accepted Solutions (1)

Accepted Solutions (1)

bill_froelich
Product and Topic Expert
Product and Topic Expert

Yes, getVersionInfo() is the call to get the MDK Client version. This call returns an array of key value pairs and one of them is the MDK client version. See the Help Doc for more details on the keys

Depending on the platform you will look for a different key:

  • iOS - SAPMDC
  • Android - MDKClient Version
  • Web - WebClient Version
Julius123
Participant

I'd like to add that, at least for me in version 6.3.4, in web, you currently have to add a ": " at the end of the keys.

For iOS, using ''SAPMDC" as the key works.

For Web, using "WebClient Version" doesn't work. By using JSON.stringify, I found out the actual key is "WebClient Version: ". (notice the extra colon and space)

michaelhaydock
Participant
0 Kudos

In the same call getVersionInfo(), what does "Definitions Version" represent? Is it the "Application Properties" definition inside the MDK project? I am looking to display the deployment revision number in my app, and don't know if this is it. In my app, "Definitions Version" always shows a value of "1".

bill_froelich
Product and Topic Expert
Product and Topic Expert
mhaydockvesta

versionInfo['Application Version'] is the AppVersion from MDKProject.json

versionInfo['Definitions Version'] is the Version from Application.app in the metadata

Answers (0)