DEVELOPERS BLOG

How to Implement a Managed App Configuration for iOS via BlackBerry UEM

Setting up the Application Configuration for a managed iOS app enables IT admin of a MDM Server such as UEM, to send properties to the app. For UEM this gives the Administrator the ability to push down enterprise data or configurations as custom and/or default variables. A managed iOS application accesses the information using the UserDefaults class. This lets IT admin configure apps remotely for their enterprise users and app developers. Instead of users configuring the app manually after they install the app. On UEM, you can check the list of default variables here and custom variables here.

Default variables are preconfigured on the server such as %AccessKeyExpiry%, which tells the app date and time that an access key expires.

When information is not available by default variables you can use Custom Variables. For example, if the admin wants to specify a VPN password in the app, which is different for every use, he can use a Custom Variable.

Note – Default variables are set per app but Custom Variables are set per user.

Here are example use cases. It is common for enterprise applications to require a username and Application Server address. The admin can send the username and application server address to a UEM managed iOS app using the default variables. The administrator can also configure customizable values, which are set per user. These fields are required for one time setup of the application, so the user does not have to call IT to get their username and specific server information, reducing stress on the Help Desk or IT department.

Here are the steps to configure UEM for the iOS Managed App Configuration

  • To use Default variables –
  1. Login to UEM. Go to Apps and click (add an app) to add a new App. Select the Internal apps icon to upload your managed app’s ipa file.
  2. After you have uploaded the app, Click the App and then Settings and go to App Configuration.

3. Click + and then Configure manually.

4. Click + and then set as String.

5. Add the desired key and the value from the default variables. Enter the App configuration name and click Save. Save again to save the configurations.

  • To use Custom variables –
  1. Login to UEM. Go to Settings, then General settings and then Custom Variables. Add the variable label to a variable name and then Save.

 2. Now, go to Users and open the desired user and then click  and go to Custom variables. Add the value of the custom variable and then Save.

3. Go to apps and select the app and change the app configuration as you did with the Default variables but instead of the default variable just add the custom variable.

Here is how to access the variables in Swift –

Here is what the app looks like:

Note – UEM Application Configuration is different from BlackBerry Dynamics app policy as UEM Application Configuration needs a MDM managed device.

Debugging Tip – Make sure the app is pushed down from the UEM Server the first time and never change the Bundle Identifier but you can rebuild the app on the device to keep accessing the variables on the UEM Server. If changes are made to the variables on the UEM server, either wait for the configurations to be pushed down to the device or upload the ipa again to the UEM server push down the app.

Happy Coding!

 

Need Development Help? The BlackBerry Developer Community Forum has your Answer…Join the conversation, engage with peers, share product ideas, and get your app development questions answered. Developer Community Forum

Gurjit Ghangura

About Gurjit Ghangura

Enterprise Solutions Developer, Love BlackBerry, Developer at Heart.