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.

IMG_2225

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

IMG_2227

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.

IMG_2229

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.