<img data-attachment-id="23997" data-permalink="http://devblog.blackberry.com/2017/04/how-to-implement-a-managed-app-configuration-for-ios-via-blackberry-uem/1-18/" data-orig-file="/content/dam/devblog-blackberry-com/images/blogs/2017/04/1.jpg" data-orig-size="1622,1635" data-comments-opened="1" data-image-meta="{"aperture":"0","credit":"","camera":"","caption":"","created_timestamp":"0","copyright":"","focal_length":"0","iso":"0","shutter_speed":"0","title":"","orientation":"0"}" data-image-title="1" data-image-description="" data-medium-file="/content/dam/devblog-blackberry-com/images/blogs/2017/04/1.jpg?w=531&h=534" data-large-file="/content/dam/devblog-blackberry-com/images/blogs/2017/04/1.jpg?w=800" class="wp-image-23997 aligncenter" src="/content/dam/devblog-blackberry-com/images/blogs/2017/04/1.jpg?w=531&h=534" alt="" width="531" height="534" srcset="/content/dam/devblog-blackberry-com/images/blogs/2017/04/1.jpg?w=531&h=534 531w, /content/dam/devblog-blackberry-com/images/blogs/2017/04/1.jpg?w=1060&h=1068 1060w, /content/dam/devblog-blackberry-com/images/blogs/2017/04/1.jpg?w=150&h=150 150w, /content/dam/devblog-blackberry-com/images/blogs/2017/04/1.jpg?w=298&h=300 298w, /content/dam/devblog-blackberry-com/images/blogs/2017/04/1.jpg?w=768&h=774 768w, /content/dam/devblog-blackberry-com/images/blogs/2017/04/1.jpg?w=1016&h=1024 1016w" sizes="(max-width: 531px) 100vw, 531px" />
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 – Login to UEM. Go to Apps and click <img data-attachment-id="24004" data-permalink="http://devblog.blackberry.com/2017/04/how-to-implement-a-managed-app-configuration-for-ios-via-blackberry-uem/keys-2/" data-orig-file="/content/dam/devblog-blackberry-com/images/blogs/2017/04/keys.png" data-orig-size="42,30" data-comments-opened="1" data-image-meta="{"aperture":"0","credit":"","camera":"","caption":"","created_timestamp":"0","copyright":"","focal_length":"0","iso":"0","shutter_speed":"0","title":"","orientation":"0"}" data-image-title="keys" data-image-description="" data-medium-file="/content/dam/devblog-blackberry-com/images/blogs/2017/04/keys.png?w=300&h=214" data-large-file="/content/dam/devblog-blackberry-com/images/blogs/2017/04/keys.png?w=300&h=214" class="alignnone size-medium wp-image-24004" src="/content/dam/devblog-blackberry-com/images/blogs/2017/04/keys.png?w=300&h=214" alt="" /> (add an app) to add a new App. Select the Internal apps icon to upload your managed app’s ipa file. After you have uploaded the app, Click the App and then Settings and go to App Configuration . <img data-attachment-id="23998" data-permalink="http://devblog.blackberry.com/2017/04/how-to-implement-a-managed-app-configuration-for-ios-via-blackberry-uem/2-13/" data-orig-file="/content/dam/devblog-blackberry-com/images/blogs/2017/04/2.jpg?w=800&h=387" data-orig-size="1622,1264" data-comments-opened="1" data-image-meta="{"aperture":"0","credit":"","camera":"","caption":"","created_timestamp":"0","copyright":"","focal_length":"0","iso":"0","shutter_speed":"0","title":"","orientation":"0"}" data-image-title="2" data-image-description="" data-medium-file="/content/dam/devblog-blackberry-com/images/blogs/2017/04/2.jpg?w=800&h=387?w=300" data-large-file="/content/dam/devblog-blackberry-com/images/blogs/2017/04/2.jpg?w=800&h=387?w=800" class="alignnone wp-image-23998" src="/content/dam/devblog-blackberry-com/images/blogs/2017/04/2.jpg?w=800&h=387" height="387" />
3. Click + and then Configure manually.
<img data-attachment-id="23999" data-permalink="http://devblog.blackberry.com/2017/04/how-to-implement-a-managed-app-configuration-for-ios-via-blackberry-uem/3-9/" data-orig-file="/content/dam/devblog-blackberry-com/images/blogs/2017/04/3.jpg?w=800&h=488" data-orig-size="1622,1264" data-comments-opened="1" data-image-meta="{"aperture":"0","credit":"","camera":"","caption":"","created_timestamp":"0","copyright":"","focal_length":"0","iso":"0","shutter_speed":"0","title":"","orientation":"0"}" data-image-title="3" data-image-description="" data-medium-file="/content/dam/devblog-blackberry-com/images/blogs/2017/04/3.jpg?w=800&h=488?w=300" data-large-file="/content/dam/devblog-blackberry-com/images/blogs/2017/04/3.jpg?w=800&h=488?w=800" class="alignnone wp-image-23999" src="/content/dam/devblog-blackberry-com/images/blogs/2017/04/3.jpg?w=800&h=488" height="488" />
4. Click + and then set as String.
<img data-attachment-id="24000" data-permalink="http://devblog.blackberry.com/2017/04/how-to-implement-a-managed-app-configuration-for-ios-via-blackberry-uem/4-8/" data-orig-file="/content/dam/devblog-blackberry-com/images/blogs/2017/04/4.jpg?w=800&h=561" data-orig-size="1625,1460" data-comments-opened="1" data-image-meta="{"aperture":"0","credit":"","camera":"","caption":"","created_timestamp":"0","copyright":"","focal_length":"0","iso":"0","shutter_speed":"0","title":"","orientation":"0"}" data-image-title="4" data-image-description="" data-medium-file="/content/dam/devblog-blackberry-com/images/blogs/2017/04/4.jpg?w=800&h=561?w=300" data-large-file="/content/dam/devblog-blackberry-com/images/blogs/2017/04/4.jpg?w=800&h=561?w=800" class="alignnone wp-image-24000" src="/content/dam/devblog-blackberry-com/images/blogs/2017/04/4.jpg?w=800&h=561" height="561" />
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.
<img data-attachment-id="23991" data-permalink="http://devblog.blackberry.com/2017/04/how-to-implement-a-managed-app-configuration-for-ios-via-blackberry-uem/5-7/" data-orig-file="/content/dam/devblog-blackberry-com/images/blogs/2017/04/5.jpg?w=800&h=564" data-orig-size="1625,1462" data-comments-opened="1" data-image-meta="{"aperture":"0","credit":"","camera":"","caption":"","created_timestamp":"0","copyright":"","focal_length":"0","iso":"0","shutter_speed":"0","title":"","orientation":"0"}" data-image-title="5" data-image-description="" data-medium-file="/content/dam/devblog-blackberry-com/images/blogs/2017/04/5.jpg?w=800&h=564?w=300" data-large-file="/content/dam/devblog-blackberry-com/images/blogs/2017/04/5.jpg?w=800&h=564?w=800" class="alignnone wp-image-23991" src="/content/dam/devblog-blackberry-com/images/blogs/2017/04/5.jpg?w=800&h=564" height="564" />
To use Custom variables – Login to UEM. Go to Settings , then General settings and then Custom Variables . Add the variable label to a variable name and then Save . <img data-attachment-id="23992" data-permalink="http://devblog.blackberry.com/2017/04/how-to-implement-a-managed-app-configuration-for-ios-via-blackberry-uem/6-7/" data-orig-file="/content/dam/devblog-blackberry-com/images/blogs/2017/04/6.jpg?w=800&h=333" data-orig-size="1622,927" data-comments-opened="1" data-image-meta="{"aperture":"0","credit":"","camera":"","caption":"","created_timestamp":"0","copyright":"","focal_length":"0","iso":"0","shutter_speed":"0","title":"","orientation":"0"}" data-image-title="6" data-image-description="" data-medium-file="/content/dam/devblog-blackberry-com/images/blogs/2017/04/6.jpg?w=800&h=333?w=300" data-large-file="/content/dam/devblog-blackberry-com/images/blogs/2017/04/6.jpg?w=800&h=333?w=800" class="alignnone wp-image-23992" src="/content/dam/devblog-blackberry-com/images/blogs/2017/04/6.jpg?w=800&h=333" height="333" /> 2. Now, go to Users and open the desired user and then click <img data-attachment-id="24003" data-permalink="http://devblog.blackberry.com/2017/04/how-to-implement-a-managed-app-configuration-for-ios-via-blackberry-uem/pen/" data-orig-file="/content/dam/devblog-blackberry-com/images/blogs/2017/04/pen.png?w=800" data-orig-size="42,30" data-comments-opened="1" data-image-meta="{"aperture":"0","credit":"","camera":"","caption":"","created_timestamp":"0","copyright":"","focal_length":"0","iso":"0","shutter_speed":"0","title":"","orientation":"0"}" data-image-title="pen" data-image-description="" data-medium-file="/content/dam/devblog-blackberry-com/images/blogs/2017/04/pen.png?w=800?w=42" data-large-file="/content/dam/devblog-blackberry-com/images/blogs/2017/04/pen.png?w=800?w=42" class="alignnone size-full wp-image-24003" src="/content/dam/devblog-blackberry-com/images/blogs/2017/04/pen.png?w=800" alt="" /> and go to Custom variables . Add the value of the custom variable and then Save .
<img data-attachment-id="23993" data-permalink="http://devblog.blackberry.com/2017/04/how-to-implement-a-managed-app-configuration-for-ios-via-blackberry-uem/7-6/" data-orig-file="/content/dam/devblog-blackberry-com/images/blogs/2017/04/7.jpg?w=800&h=68" data-orig-size="975,220" data-comments-opened="1" data-image-meta="{"aperture":"0","credit":"","camera":"","caption":"","created_timestamp":"0","copyright":"","focal_length":"0","iso":"0","shutter_speed":"0","title":"","orientation":"0"}" data-image-title="7" data-image-description="" data-medium-file="/content/dam/devblog-blackberry-com/images/blogs/2017/04/7.jpg?w=800&h=68?w=300" data-large-file="/content/dam/devblog-blackberry-com/images/blogs/2017/04/7.jpg?w=800&h=68?w=800" class="alignnone wp-image-23993" src="/content/dam/devblog-blackberry-com/images/blogs/2017/04/7.jpg?w=800&h=68" height="68" />
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.
<img data-attachment-id="23994" data-permalink="http://devblog.blackberry.com/2017/04/how-to-implement-a-managed-app-configuration-for-ios-via-blackberry-uem/8-5/" data-orig-file="/content/dam/devblog-blackberry-com/images/blogs/2017/04/8.jpg?w=800&h=270" data-orig-size="1622,1462" data-comments-opened="1" data-image-meta="{"aperture":"0","credit":"","camera":"","caption":"","created_timestamp":"0","copyright":"","focal_length":"0","iso":"0","shutter_speed":"0","title":"","orientation":"0"}" data-image-title="8" data-image-description="" data-medium-file="/content/dam/devblog-blackberry-com/images/blogs/2017/04/8.jpg?w=800&h=270?w=300" data-large-file="/content/dam/devblog-blackberry-com/images/blogs/2017/04/8.jpg?w=800&h=270?w=800" class="alignnone wp-image-23994" src="/content/dam/devblog-blackberry-com/images/blogs/2017/04/8.jpg?w=800&h=270" height="270" />
Here is how to access the variables in Swift –
<img data-attachment-id="23995" data-permalink="http://devblog.blackberry.com/2017/04/how-to-implement-a-managed-app-configuration-for-ios-via-blackberry-uem/9-5/" data-orig-file="/content/dam/devblog-blackberry-com/images/blogs/2017/04/9.jpg?w=800&h=116" data-orig-size="1625,629" data-comments-opened="1" data-image-meta="{"aperture":"0","credit":"","camera":"","caption":"","created_timestamp":"0","copyright":"","focal_length":"0","iso":"0","shutter_speed":"0","title":"","orientation":"0"}" data-image-title="9" data-image-description="" data-medium-file="/content/dam/devblog-blackberry-com/images/blogs/2017/04/9.jpg?w=800&h=116?w=300" data-large-file="/content/dam/devblog-blackberry-com/images/blogs/2017/04/9.jpg?w=800&h=116?w=800" class="alignnone wp-image-23995" src="/content/dam/devblog-blackberry-com/images/blogs/2017/04/9.jpg?w=800&h=116" height="116" />
Here is what the app looks like:
<img data-attachment-id="23996" data-permalink="http://devblog.blackberry.com/2017/04/how-to-implement-a-managed-app-configuration-for-ios-via-blackberry-uem/10-5/" data-orig-file="/content/dam/devblog-blackberry-com/images/blogs/2017/04/10.jpg?w=800&h=134" data-orig-size="1625,387" data-comments-opened="1" data-image-meta="{"aperture":"0","credit":"","camera":"","caption":"","created_timestamp":"0","copyright":"","focal_length":"0","iso":"0","shutter_speed":"0","title":"","orientation":"0"}" data-image-title="10" data-image-description="" data-medium-file="/content/dam/devblog-blackberry-com/images/blogs/2017/04/10.jpg?w=800&h=134?w=300" data-large-file="/content/dam/devblog-blackberry-com/images/blogs/2017/04/10.jpg?w=800&h=134?w=800" class="alignnone wp-image-23996" src="/content/dam/devblog-blackberry-com/images/blogs/2017/04/10.jpg?w=800&h=134" height="134" />
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