Exploring apple’s Managedappconfig feedback

In part one of this two part series, I showed how you can use TestMDM to remotely install and configure Apple’s ManagedAppConfig sample app. In this part, I will demonstrate how you can retrieve feedback recorded by the app.

Apple allows an app to read managed configuration by opening the “com.apple.configuration.managed” key in NSUserDefaults. It also allows data to be stored in “com.apple.feedback.managed”. This data can be retrieved by an MDM at any time, allowing the app to effectively report back.

When you launched the ManagedAppConfig app, you will see two labels, Success and Failure, each with a count. The count is zero.


If you hit the go button, you will see the failure count increase to 1. Go ahead and press it a few times.

Now, using TestMDM, update the serverURL value to be a site you know exists. In my case, I’m using www.tomasmcguinness.com. Read part one to see how you update the configuration. Once the app has updated the URL value, hit Go another couple of times. The Success count should increase accordingly.


The app has, in the background, been recoding the values for Success and Failure in the “com.apple.feedback.managed” setting key. We now want to retrieve this data.

From the “Queue Command” menu in the Commands section of TestMDM, choose Fetch App Feedback.

Screen Shot 2014-03-09 at 11.26.21

The Get Managed App Feedback (I need to change the name!) dialog will open.

Screen Shot 2014-03-09 at 11.26.40

Enter “com.example.apple-samplecode.ManagedAppConfig” as the bundle identifier, assuming you haven’t changed it from the value in Apple’s code. The command will be queued.

Screen Shot 2014-03-09 at 11.26.58

Once it has completed success, just click the Show Details option.

Screen Shot 2014-03-09 at 11.27.12

Et Voila, you’ll see a PList formatted document containing two keys, which contains the values in the UI.

If you are interested in testing your own Enterprise apps, you can sign up to TestMDM for free and get one hours free trial.

If you have any questions or comments, please email me tomas@coldbear.co.uk or leave a comment below.

Exploring Apple’s Managedappconfig demo

Having created TestMDM, I’ve had a few people try to experiment with Apple’s ManagedAppConfig sample. This sample is used in their WWDC video on iOS 7’s Enterprise features and demonstrates how to used Managed App Configuration to control a URL and a UISwitch.

Unfortunately, Apple don’t provide anything more than an XCode project, so it’s hard to understand how you’re supposed to evaluate and test the code. This is what this blog post hopes to show. I’ll be using my TestMDM (http://www.testmdmapp.com) service to perform the installation and configuration, but any MDM that supports iOS 7 will be able to do the same thing.

To get started, download the XCode project from Apple. https://developer.apple.com/library/ios/samplecode/sc2279/Introduction/Intro.html

Open it in XCode and compile it. XCode may prompt you to create a provisioning profile for this app, so click Okay and let it work its magic. Once you have successfully compiled the app, you will need to Archive it.

Screen Shot 2014-03-07 at 08.25.18

Once you have successfully archived it, hit the Distribution button to start the packaging process.

 Screen Shot 2014-03-07 at 08.25.36

Sign the with the provisioning profile that was created. In this case, I am using my WildCard development profile.

 Screen Shot 2014-03-07 at 08.26.04

Choose Enterprise deployment and enter “ManagedAppConfig” as the name of the app, leaving all other fields blank. I’m saving these files to my desktop, but you can save them in a location that suits you.

Screen Shot 2014-03-07 at 08.26.26

No that we have both the IPA and Manifesto, we can open up TestMDM and get ready to deploy the app to your device for testing. I am assuming that you have registered a device for testing with TestMDM. If you haven’t please do so before continuing.

Open the commands page view and from the Queue Command dropdown, choose Install App.

Screen Shot 2014-03-07 at 08.34.47

 Screen Shot 2014-03-07 at 08.34.56

Click Browse for Manifest and navigate to where you exported the Archive from XCode. Choose the file with the plist extension.

Screen Shot 2014-03-07 at 08.35.15

Click Browse for IPA and choose the IPA file.

Screen Shot 2014-03-07 at 08.35.27

Both files should upload and you can then choose Submit.

Screen Shot 2014-03-07 at 08.35.35

At this point, you should return to your registered device. It will indicate that there is a pending app installation.


Click install and the app should be downloaded and installed on your device. Launch the app and you’ll see a simple screen showing a URL, a large empty box and a switch at the bottom. We can, using the Managed Configuration, control the value of the URL and the Cloud Sync switch


As you can see, the URL is http://foo.bar and the Cloud Document Sync is turned on. Let’s update these settings. Return to TestMDM and choose “Configure App” from the Queue Commands dropdown.

Screen Shot 2014-03-07 at 08.40.19

The bundle id comes from XCode and I have left it unchanged from the value used in the sample. This unique identifies the app.

The configuration has two settings, serverURL and disableCloudDocumentSync. This configuration is in Apple’s stand PList format. I’m using http://www.testmdmapp.com as the URL, but you can choose any value you wish.I’m also setting the disableCloudDocumentSync value to 1, which will turn off the switch. Click Queue.

In a second or two, the ManagedAppConfig app running on your test device should update.


You have just performed a managed app configuration update.

Part of Managed App Configuration is Feedback. You will notice two counts on the app, one for Success and one for Failure. In my next post, I’ll show how these values can be read from within TestMDM.

If you have any comments or questions, please leave a message here or get in touch using tomas@coldbear.co.uk.

iOS Enterprise managed app configuration

With the release of iOS 7, Apple introduced support for managing an app’s configuration using a Mobile Device Management system. This allows enterprises to deploy apps and then control their configuration centrally. You could provide URLs or enable and disable features with the push of a button.

An app that supports managed configuration just needs to read a particular key, com.apple.configuration.managed from NSUserDefaults. This yields an NSDictionary which contains all the settings pushed to the app via the MDM. For my work with Roomr, I choose to support managed configuration so that the Exchange URL could be set and modified with ease.  The code changes are very simple.

Testing managed configuration is another kettle of fish. You can provide the configuration in one of two ways. Firstly, you can provide the configuration when the app is being installed or you can provide it after the app has been installed, effectively updating it.

To accomplish this, I used my own product, TestMDM. TestMDM aims to replicate many of the features of a MDM without replicating the large cost and complicated setup. It’s aim is to make it possible to test enterprise features without having to suffer the expense of purchasing an MDM. It also means you don’t need to trick an MDM provider into giving you a trial and then spending hours getting that setup.

To test my configuration, I used TestMDM to first install my app. Once I had successfully installed it, I then pushed configuration to it


I just click Queue and TestMDM takes care of the rest. I can debug my iPhone app at the same time and ensure the configuration is detected and loaded correctly.

If you’re interested, please check out TestMDM – I’m making improvements all the time so if a particular feature is missing, let me know and I’ll add it to the roadmap.

For developers who want their apps in large enterprises, supporting iOS7’s Enterprise features, such as single sign-on and managed configuration, is a no-brainer. Hopefully you’ll find TestMDM useful. If you have any questions, please get in touch!

Testing iOS Enterprise features without an MDM

Recently, I deployed a special version of Roomr to a large enterprise customer for inclusion in their Enterprise App Store. Part of the arrangement was that I support two enterprise features; Single Sign-On and Managed App Configuration.

This, on the face of it, was an excellent deal. I watched some WWDC videos on preparing apps for Enterprise and had managed to land a face to face meeting with the head of IT at this company. It seemed like a small amount of code would need changing in exchange for a tremendous financial opportunity (the company in question has over 120K employees world wide).

However, things are rarely as easy as they appear.

I immediately discovered, to my dismay, that the Managed App Configuration feature required a full MDM (mobile device management) platform to operate correctly. I searched the internet looking for MDM software that I could download and use for testing, but sadly I couldn’t find any. All of the major providers offer trial versions, but you have to get in touch with them etc. etc. As I wasn’t going to buy their software, they were understandable disinterested.

I knew I needed to test my software before releasing it, so I needed another approach.

I decided to build the software I needed to complete my testing. After some prelimiary research I discovered I needed to be a member of the Apple iOS Enterprise developer program. At £185, this was a hefty amount, but the potential earnings from a successful enterprise deployment made it worth the investment. I handed over my credit card information and got Cold Bear Ltd registered within the Enterprise program.

After getting the MDM protocol documentation (thanks to Peter Marcos at Apple for helping with this), I got to work. After much hair pulling, use of SSL and prolific swearing, I got a basic MDM solution working. Another few hours and I had tested my Enterprise code. I packaged up the IPA and emailed it to my client.

After the dust settled, I got an email from another developer who was having trouble testing the same Managed Configuration feature. After establishing that he would be willing to pay money for a simple way to test this feature (his MDM wasn’t working) I started refactoring my code.

After more swearing and hair pulling, TestMDM (http://testmdm.cloudapp.net) was born! TestMDM offers basic MDM functionality in a time-boxed fashion. You might want to test your app for an hour or a week and you only pay for the time you need. I hope this strikes a balance between the time and cost purchasing an MDM and the need to test some features quickly and effectively.

It’s almost ready for launch. I’m just putting the finishing touches to the device enrolment functionality to make it as easy as possible.

So, if you’re an enterprise developer or thinking of getting into enterprise development, TestMDM might be of use to you. If you’d like to know more, please drop me an email – tomas@coldbear.co.uk and I’d be happy to have a chat about what you need for enterprise development.


PS The name TestMDM is most likely to change Smile If you have any suggestions, I’d love to hear them.