-
Notifications
You must be signed in to change notification settings - Fork 20
Description
Apple introduced this spring the ManagedApp framework that is meant to replace the legacy managed app configuration through UserDefaults and 'legacy' MDM technologies.
It would be great to see Apple provide another built-in ConfigProvider that is backed by the ManagedApp framework implementation. Since this library is iOS 18+, it aligns fairly well with the minimum requirement of iOS / iPadOS 18.4, and visionOS 2.4. That having been said, the more robust solution to support apps that were deployed and configured via MDM would be to implement a UserDefaults ConfigProvider too specifically looking at the dictionary inside "com.apple.configuration.managed", which is where the 'legacy' app config lives.
MDM providers still would need to support the newer Declarative Device Management mechanism to enable ManagedAppConfigProvider. Having a ConfigReader with both the modern provider, and the legacy provider would allow apps to seamlessly transition between the two and phase out the legacy stuff.
Implementing all of the synchronous flavors of the ConfigProvider protocol would require some carefully crafted code given the nature of ManagedAppConfigProvider is entirely async sequences via https://developer.apple.com/documentation/managedapp/managedappconfigurationprovider/configurations(_:)
You could even place all of this behind an MDM trait! I haven't spent time in Xcode trying to configure traits yet for a Swift Package, hopefully Xcode 26.x supports that in the UI without making a package-in-the-middle turning on those traits.
Feature Requests:
- Implement ConfigProvider that uses ManagedAppConfigProvider
- Implement ConfigProvider that reads from UserDefaults dictionary "com.apple.configuration.managed"