One of the most significant announcements that came out the 2016’s Mobile World Congress is the birth of the AppConfig Community, a collaboration of some of the top Enterprise Mobility Management (EMM) providers.
What is AppConfig?
When Enterprise Mobility Management (EMM) became a reality, many providers offered their own SDKs to companies and developers, each with their own APIs and services. The problem was, companies had to adapt applications each time they decided to migrate to another platform.
This was also a problem for providers, as companies and developers were reluctant to switch to new platforms, not to mention developers, who had to learn new APIs and SDKs each time a client wanted to user a new EMM provider’s tools.
To solve these problems, several providers (IBM, VMWare, Cisco, SAP among several others) created the AppConfig Community (App Configuration for the Enterprise).
The goal of the AppConfig Community is to define a collection of best practices for enterprise application developers to interpret application configurations and security policies from MAM (Enterprise App Management) systems, and for EMM servers to configure and secure mobile applications.
Integrating EMM into applications
When developing enterprise mobile applications, one of the first challenges that comes into the development arena is how to remotely set dynamic data into mobile devices and applications.
The problem gets worse when the application needs to run on different operating systems (iOS, Android, etc.) or when they need to get information from a number of configuration sources.
AppConfig defines a standard set of protocols, workflows and APIs for configuring and securing applications in the enterprise, regardless of the actual EMM platform chosen by the company. This allows developers to focus on application development instead of worrying about provider compatibility.
What’s the advantage of AppConfig?
AppConfig provides a unique set of workflows for configuration, security, and access:
- App configuration
Configure information such as URLs, project information and general app settings to eliminate the need to manually configure these settings, redevelop applications each time they change and educate end users about first time setup.
- Security policies and access control
This encompasses the ability to restrict apps to run only on approved devices and the means to enforce security policies, such as required encryption and data loss prevention at the app level.
- App Tunnel
Selectively enable approved apps to use an app tunnel to connect to backend and corporate networks.
- Single Sign-On
Enable single sign-on across enterprise apps, leveraging existing identity management solutions.
This way, enterprises leverage their existing investments in their systems, VPNs, and identity management solutions even after switching from a platform to another. When adopting AppConfig’s workflow and APIs, there’s no need to redevelop applications, as long as the app follows AppConfig’s rules and APIs.
On Android, application settings are stored as managed configurations (previously known as application restrictions), which allow the organization’s IT admin to remotely specify settings for each managed app.
On iOS, application configuration is stored in the NSUserDefaults object, inside the “com.apple.configuration.managed” dictionary. This is a powerful mechanism enterprise and educational institutions can use to remotely configure managed applications from a centralized MDM server. Also, feedback (such as critical errors) can be written by the app into NSUserDefaults which can then be queried by an MDM server.
Integration with Apache Cordova
A few weeks ago, I was asked to create a Cordova application interacting with VMWare’s airwatch EMM platform. This application was supposed to get user information and some configuration settings (server URLs for load balancing, among other app settings).
After testing a couple VMWare’s proprietary plugin with no luck, I decided to get my hands on an plugin named “Cordova Plugin for EMM App Config“, available for both Android and iOS, covering most of today’s mobile market. This plugin was developed by Oracle but it’s available to developers as an Open Source project in GitHub.
This plugin is very simple. It defines a global cordova.plugins.EmmAppConfig object, which provides 2 methods (getValue() and registerChangedListener()) for retrieving information from EMM application configuration or managed app configuration (MAM) settings. Although the object is in the global scope, it is important to remember that it won’t available until after the deviceready event has fired.
This method lets applications get value from the application configuration.This value usually comes as a string or a number.
To work around this limitation, date and binary data can be encoded (using a JSON string, for instance) and passed as strings in the application configuration. Then, applications can then decode them accordingly, once they are retrieved. This method takes a single parameter.
This method lets applications to register a listener function that will be invoked when any of the application configuration values is changed.
The listener will not received information about which application configuration value(s). Because all apps share the same MAM configuration dictionaries, any change to these storage areas (see above) will invoke the listener, even if the change is not within the application’s configuration set.
The listener should call the getValue method to get the current values and decide how to handle any change. It is also possible that the same change will invoke the listener more than once (for instance, when more than one value has changed).
This method also takes a single parameter.
For information on how each OS supports managed app configuration, you can check the following developer guides: