iosxmlfloating-pointmdmairwatch

How to push floating point App Config values via Airwatch


We have implemented an iOS app which is deployed via Airwatch (an MDM/Mobile Device Management solution) and are in the process of updating the app so that certain aspects of the app's configuration can be pushed from Airwatch.

Airwatch supports the App Config standard (see https://www.appconfig.org/ios/), which is also implemented by iOS. We need to push a String, an Int and two floating point values to the app, so as to write these into NSUserDefaults (as per the App Config spec).

The problem we are having is that Airwatch is ignoring the floating values and not pushing these to the client.

The App Config standard states that floating point values are supported.

Does anyone know if Airwatch does not support this?

When the same configuration is pushed via http://www.testmdmapp.com (a developer friendly, simple MDM solution), it works perfectly.

Here is the XML Plist which is being pushed:

<?xml version="1.0" encoding="UTF-8"?>
<managedAppConfiguration>
    <version>0.0.1</version>
    <bundleId>com.foobar.MyApp</bundleId>
    <dict>
        <string keyName="configId">
            <defaultValue>
                <value>42</value>
            </defaultValue>
        </string>
        <float keyName="configLatitude">
            <defaultValue>
                <value>50.102549400000001</value>
            </defaultValue>
        </float>
        <float keyName="configLongitude">
            <defaultValue>
                <value>-0.10663980050000001</value>
            </defaultValue>
        </float>
        <string keyName="configString">
            <defaultValue>
                <value>Config-String-Value-Here</value>
            </defaultValue>
        </string>
    </dict>
</managedAppConfiguration>

Solution

  • The options in the AirWatch console 9.0 are "Boolean, Date, Integer, and String" The link shown is the current 9.0 console version's view of an Application Configuration entry.

    App Config Setting in AW Console https://i.sstatic.net/2ncid.jpg

    I tested your value "50.102549400000001" for all 4 types in the console.

    Boolean = Save Failed Incorrect Value For Key: test

    Date = Save Failed Incorrect Value For Key: test

    Integer = Save Failed Incorrect Value For Key: test

    String = Saved Successfully

    From the console UI perspective "string" accepted the value. As to the app applying it correctly, it would still need to test with the app, and a live deployment, and app assignment of the configuration setting.

    There are no articles or public discussions currently published on my.air-watch.com referring to floating point and app config together.

    Though in Console 9.1 ... XML can be uploaded with key-value pairs as appropriate, though they did not list float in their example here. You may need to register to view it.

    Uploading XML: An AirWatch administrator can push the managed AppConfig by uploading an XML file containing the key-value pairs.

    1. Under the Internal App Detail view select Assign.
    2. Select the Smart Group and choose Edit Assignment.
    3. Scroll down and enable App Configuration.
    4. Select Upload XML.
    5. Save and Publish the changes.

    Note: This option was introduced in AirWatch 9.1. The XML schema should look like the following snippet. Replace the bundle ID with the bundle ID of your application and change the key-value pairs as appropriate.

    <managedAppConfiguration>
          <version>1</version>
          <bundleId>com.vmware.gss.AirWatchAppConfigSample</bundleId>
          <dict>
               <string keyName="awservername">
                    <defaultValue>
                         <value>server.awmdm.com</value>
                    </defaultValue>
               </string>
               <integer keyName="counter">
                    <defaultValue>
                         <value>250</value>
                    </defaultValue>
               </integer>
          </dict> 
    </managedAppConfiguration>
    

    An AirWatch administrator can update the managed AppConfig for their enterprise apps using the following steps:

    1. Update the values for the managed AppConfig keys by navigating to Edit Application > Assignment > Application Configuration.
    2. Select Save and Publish.
    3. Navigate to App Details and select More > Send Application Configuration.