I am developing an iOS application with a Location Push Service Extension and am trying to provide managed app configuration to the extension using Apple's ManagedAppConfigurationProvider and Declarative Device Management (DDM).
The same managed configuration works correctly in the containing application, but the exact same API fails when called from the Location Push Service Extension.
Environment:
iOS: 26.2.1 Xcode: 16.4 Extension type: Location Push Service Extension
The extension has the following entitlement in both the signed extension and provisioning profile:
<key>com.apple.developer.location.push</key> <true/>
The extension is configured through DDM using ExtensionConfigs:
"ExtensionConfigs": { "bundleid (teamid)": { "DataAssetReference": "xxxxxxx" } }
The Data Asset is successfully compiled by the MDM server and contains the managed configuration values.
The device reports the following DDM status:
"config-state": { "app-config-state": { "state": "valid" }, "extension-config-state": { "bundleidofextension": { "state": "unknown" } } }
The main application can successfully retrieve the configuration using:
let provider = ManagedAppConfigurationProvider()
Task { for await configuration in await provider.configurations( ModelManagedAppConfiguration.self ) { print("APP CONFIG = (String(describing: configuration))") } }
The same code and the same configuration type are used inside the Location Push Service Extension.
Inside the extension, the provider is created successfully:
LOCATION EXTENSION: creating ManagedAppConfigurationProvider LOCATION EXTENSION: provider created LOCATION EXTENSION: requesting configurations
However, the request fails with:
Failed to connect to managedappsd with error Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.devicemanagementclient.managedappsd was invalidated from this process." Failed to fetch managed app configuration. Returning nil. Error: XPC connection failed with error Optional("Couldn’t communicate with a helper application.") Failed to determine managed app configuration changed notification name. Unable to register for notifications. Failed to report configuration error state. Error: XPC connection failed with error Optional("Couldn’t communicate with a helper application.") LOCATION EXTENSION: CONFIG = nil
The important observation is that the configuration works from the containing application but fails from the Location Push Service Extension before the configuration reaches the Decodable configuration type.
I have also verified:
The extension Bundle ID matches the ExtensionConfigs entry. The Team ID matches. com.apple.developer.location.push is present in the signed extension. com.apple.developer.location.push is also present in the provisioning profile. The DDM Data Asset is successfully compiled. The containing application's managed configuration state is valid. The same ManagedAppConfigurationProvider code works in the containing application.
According to Apple's documentation, ManagedAppConfigurationProvider provides configurations for a managed app or extension, and ExtensionConfigs is the DDM mechanism for configuring extensions.
My question is:
Is ManagedAppConfigurationProvider fully supported from a Location Push Service Extension?
If it is supported, what could cause managedappsd to reject/invalidate the XPC connection specifically when the request originates from a Location Push Service Extension?
Could there be an additional entitlement, extension-specific configuration, or system restriction required for ManagedAppConfigurationProvider to communicate with managedappsd from this type of extension?
Any guidance on how to further diagnose the NSCocoaErrorDomain Code=4099 / "Couldn’t communicate with a helper application" error would be appreciated.