Detect whether ClassKit is active?

What would be the best way to determine whether my app is used by students, teachers, or all other consumers? I would like my app to behave slightly different when used in an educational environment. For example, hide UI elements that would cause a parent gate to pop up, such as for IAP or external links.

Accepted Reply

The best approach is to let the distributors of your app determine the visibility of those features as part of its deployment within their organizaton. Business and educaton enviroments use a combination of Managed App Configuration and Mobile Device Management software to install apps and set the various properties that would otherwise need to be set by a user during on-boading or by administrators whom would have to touch every device.


Check out the Managed App Configuration sample here:

https://developer.apple.com/library/content/samplecode/sc2279/Introduction/Intro.html


-Mark

Replies

The best approach is to let the distributors of your app determine the visibility of those features as part of its deployment within their organizaton. Business and educaton enviroments use a combination of Managed App Configuration and Mobile Device Management software to install apps and set the various properties that would otherwise need to be set by a user during on-boading or by administrators whom would have to touch every device.


Check out the Managed App Configuration sample here:

https://developer.apple.com/library/content/samplecode/sc2279/Introduction/Intro.html


-Mark

An approach I've been playing with is to, when the app is started, if it has been started with an activity via the:


func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([Any]?) -> Void) -> Bool

method, use that knowledge to trigger any changes in behaviour I want in a classroom environment.


That said, now that @Malonicus has given us that link, I'll be looking at that too. I'd no idea that mechanism existed, and indeed it would be one way to address the limitations of the ClassKit API (whereby an app activity cannot be adequately configured) that I have mentioned elsewhere.


I think it is safe though, that if the app has been launched from SchoolWork via ClassKit once, the app could consider itself to be a school owned app, and thus hide things like adverts, IAP, parent areas, etc.