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 stable plugin and 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 per Google's and Apple's guidelines.
- Assign the Cordova app to an Workspace ONE enrolled device.
- For Android, use Android Integration Guide with 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 our Cordova AppConfig sample app in 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:
- Under the Internal App Detail view select Assign.
- Select the Smart Group and select Edit Assignment.
- Scroll down and enable App Configuration.
- 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.
- Save and Publish the changes.
Upload XML: An Workspace ONE administrator can push the managed AppConfig by uploading an XML file that contains the key-value pairs.
- Under the Internal App Detail view select Assign.
- Select the Smart Group and select Edit Assignment.
- Scroll down and enable App Configuration.
- Select Upload XML.
- Save and Publish the 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.
- Import the application from the Google Play Store by navigating to Apps > List View > Public > Add Application.
- Under the App Assignment section, enable Application Configuration.
- 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.
- Select Save and Publish.
An Workspace ONE administrator can update the managed AppConfig for their enterprise applications using the following steps
- Update the values for the managed AppConfig keys by navigating to Edit Application > Assignment > Application Configuration.
- Select Save and Publish.
- Navigate to the App Details and select More > Send Application Configuration.
Other Languages: 日本語
0 Comments