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.

Advertisements

20 thoughts on “Exploring Apple’s Managedappconfig demo

  1. My employer and I were interested in purchasing licensing to run a few tests (we have ran free tests in the past), however, your site appears down. Is this just temporary, or will it be back up (try accessing /account/license)?

    • Hi Brian

      It will be back up. I’m having some problems with Azure at the moment and a broken assembly reference. It should be back up by Friday. Sorry for the inconvenience, especially as you’re a potentially paying customer!

      Regards,
      Tom

  2. Hey Tom,

    I am experiencing problems issuing a Install App command. It repeatedly shows an alertbox with “Failed to create command [HttpStatus: 500]”. Is the service down at the moment?

    Regards,
    Marco

  3. Hi Tomas,

    I’m poking around at the managed app config stuff, and I was wondering if you happened to have tested what the behaviour is like with the device if you attempt to push down the app config values before the app is actually installed on the device?

    Does the config arrive at the device so that when the app gets installed it’d have immediate access?
    or does the app need to be installed first?

  4. Hi: Thanks for your article. I need to go one step behind of this .. and got something clear. IPA + config.plist makes an IPA file that, whenever is deployed by the MDM / MDA on each terminal, will install and configure the app on each mobile with some kind of configurations.. right?

    Thanks

    • In effect, yes. When both are supplied, the MDM will attempt to install the app and the app’s config at the same time. When the app is then opened, the managed configuration dictionary will be populated with the supplied config. This results in a better experience for the user since the app is essentially pre-configured. I hope that helps.

      • Yes ..Thanks. I’m working with a similar approach with an MDM/MDA. The point is obtain the “IPA with steroids” since the MDM/MDA workflow only admits and IPA file for the deployment process. More in deep (this is XEN mobile), IPA is absorbed into another pre-population workflow (MDX toolkit). It tooks the IPA, add our signature, add an extra layer of policies that should be use on the deployment.. and that’s it. The input of this process is purely an IPA file, not an IPA+plist file. Is there any way to obtain this “IPA with steroids”?

        Thanks a lot

  5. I have enterprise application, we normally push this application via MDM and users can install this application on the devices. My question, how can I update my webservice (server information) via mdm in the app. Now server information stored as a separate setting.plist file in the app directory. I want to update this info.

  6. Great post, it has shed a lot of light but I still have one question – If 5 users install this, is there a way to have different configs for each? Can 4 of them have the switch on and 1 have it off, for example?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s