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.
Once you have successfully archived it, hit the Distribution button to start the packaging process.
Sign the with the provisioning profile that was created. In this case, I am using my WildCard development profile.
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.
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.
Click Browse for Manifest and navigate to where you exported the Archive from XCode. Choose the file with the plist extension.
Click Browse for IPA and choose the IPA file.
Both files should upload and you can then choose Submit.
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.
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 firstname.lastname@example.org.