VMware Workspace ONE Managed AppConfig Sample - Cordova

Cordova provides a number of plugins to fetch managed AppConfig on devices that are enrolled into an EMM provider, such as Workspace ONE. Oracle provides one such stablepluginand you can download it using NPM. These values are sent to the device using the MDM protocol. It's crucial that the app in question is configured correctly in the Workspace ONE Console so that it can leverage AppConfig. Review the prerequisites to use managed AppConfig for the Cordova platform. 

  • Integrate a Cordova app with a plugin that invokes native managed AppConfig code on iOS and Android. You can also develop the app by manually writing the native managed AppConfig code as perGoogle'sandApple'sguidelines. 
  • Assign the Cordova app to an Workspace ONE enrolled device. 
  • For Android, useAndroid Integration Guidewith Workspace ONE so that you can push this app either from the Google Play Store. 

 

Develop Applications That Support Managed AppConfig on Cordova

Add the EMM AppConfig plugin to your Cordova-based application:

cordova plugin add cordova-plugin-emm-app-config --save

 

Fetch the managed AppConfig parameters:

document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
     console.log(cordova.plugins.EmmAppConfig.getValue("keyName"));
}

 

See the sample app:

Locate the implementation of managed AppConfig in ourCordova AppConfig sample appin the AppConfigCordovaSample/www/js/index.js file. 

 

Publish Managed AppConfig for Cordova-based iOS applications in VMware Workspace ONE

Manually: An Workspace ONE administrator can push the managed AppConfig for their enterprise applications using the following steps: 

  1. Under the Internal App Detail view selectAssign. 
  2. Select the Smart Group and selectEdit Assignment. 
  3. Scroll down and enableApp Configuration. 
  4. Enter the key-value pairs required for the application. The key needs to match the key-value pairs programmed into the application by the developer. 
  5. Save and Publishthe changes. 

Upload XML: An Workspace ONE administrator can push the managed AppConfig by uploading an XML file that contains the key-value pairs. 

  1. Under the Internal App Detail view selectAssign. 
  2. Select the Smart Group and selectEdit Assignment. 
  3. Scroll down and enableApp Configuration. 
  4. SelectUpload XML. 
  5. Save and Publishthe changes. 

Note: This option was introduced in Workspace ONE 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.

<managedAppConfiguration>
     <version>1</version>
     <bundleId>com.vmware.gss.Workspace ONEAppConfigSample</bundleId>
     <dict>
          <string keyName="awservername">
               <defaultValue>
                    <value>server.awmdm.com</value>
               </defaultValue>
          </string>
     </dict>
</managedAppConfiguration>

 

Publish Managed AppConfig for Cordova-based Android applications in Workspace ONE 

An Workspace ONE administrator can push the managed AppConfig for their enterprise applications using the following steps. 

  1. Import the application from the Google Play Store by navigating to Apps > List View > Public > Add Application. 
  2. Under the App Assignment section, enableApplication Configuration. 
  3. Enter the key-value pairs required for the application. The key needs to match the key-value pairs programmed into the application by the developer. 
  4. SelectSave and Publish. 

 

An Workspace ONE administrator can update the managed AppConfig for their enterprise applications using the following steps 

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

Other Languages: 日本語

Have more questions? Submit a request

0 Comments

Article is closed for comments.