Jamf Blog
December 17, 2019 by Eric Blakely

Managing Swift Playgrounds subscriptions with AppConfig and Jamf

Learn how to customize Swift Playgrounds by applying settings remotely with Jamf Pro or Jamf School.

What is AppConfig and how does it work in Jamf Pro and Jamf School?

When you deploy managed iOS apps using Jamf Pro or Jamf School, you may have noticed a tab for App Configuration or Managed Configuration.

This section allows administrators to customize the behavior of an app by applying settings remotely. This means that the end user receives an app that is pre-configured for server connections or other settings. Jamf Pro’s Self Service is a great example of this: admins apply some simple XML (more on that later), which sends relevant device and server information to individual devices. The end user experiences the content and resources that are available to them without having to do any setup at all.

Many developers have realized the power of AppConfig to better connect their app users to the resources and experience the developer intended. You can learn more about AppConfig and see some of the developers that have joined the consortium by checking out https://developer.jamf.com/app-config.

Enter Swift Playgrounds

When Swift Playgrounds was first introduced to schools in 2016, it was a game changer. It instantly brought the complex topic of coding down to a level that was accessible to all learners. For teachers who might not have had prior coding experience, they now have an easy way to introduce coding concepts to their students. The great thing about coding, and Swift Playgrounds, is that the skills students learn can translate across disciplines: from math to ELA to science and the arts.

As Swift Playgrounds evolved, outside developers like Sphero or LEGO created their own Playgrounds for their products or project. They could deliver this additional content via a subscription that teachers or students would enter into the app as a URL.

While the ability to add these subscriptions certainly adds to the depth of the Playgrounds app, it can potentially be a cause for loss of instructional time when trying to set up. For anyone with teaching experience, the thought of guiding an entire class through entering a lengthy URL probably conjures thoughts of organized chaos. Thankfully, the latest update of Swift Playgrounds allows MDM administrators to leverage the power of AppConfig to make the task of managing these subscriptions a breeze. Let’s take a look at how this works.

XML: simple yet powerful

XML (Extensible Markup Language) is a markup language that defines a set of rules for encoding documents in a format that is both human readable and machine readable. For the purposes of this AppConfig, the XML will have “keys,” or the data types we want to insert into the app experience, as well “strings,” which contain the actual data. Below is a sample XML file used to add two subscriptions to the Swift Playgrounds app that you can use as a starting point to craft your own managed app configuration.

Let’s break this down a bit:

 ThirdPartyAutoSubscriptionList

This is the first data type that tells Swift Playgrounds that we’re going to be sending some subscription information.

 
 

Each subscription contains multiple “keys,” so we’ll enclose them in the dictionary element.

 Identifier

This just needs to be a unique string, so feel free to enter whatever you want here.

 URL

The element within this “key” contains the actual subscription URL. This would be the part that the teacher would need to hand out or display for each student to manually enter into the Swift Playgrounds app. As you can see, having to do that across all the devices in a classroom is not the best user experience.

Once we’ve added the completed XML into the App Configuration area in Jamf Pro or Jamf School, the end user can now open up the app and see the subscriptions listed as “Third Party” under the “More Playgrounds” section. Just like that, you have empowered end users and given more time back to teaching and learning within the classroom. Happy coding!

Eric Blakely
Subscribe to the Jamf Blog

Have market trends, Apple updates and Jamf news delivered directly to your inbox.

To learn more about how we collect, use, disclose, transfer, and store your information, please visit our Privacy Policy.