In our custom mobile device management (MDM) solution we use managed app configuration:
- MDM server pushes InstallApplication payload with Configuration dictionary.
- The app uses
[[NSUserDefaults standardUserDefaults] dictionaryForKey:@"com.apple.configuration.managed"];
Everything worked fine.
Due to changes in iOS 8.1.3 we resigned the application as it's described here. After that the app can be installed and it launches well on iOS 8.1.3+. But it cannot read the configuration using NSUserDefaults (configuration data from MDM server is not set).
In logs I see this warning:
profiled[128] : *** -[NSXPCConnection valueForEntitlement:]: Error getting value for entitlement 'com.apple.managedconfiguration.profiled-access': Error Domain=NSPOSIXErrorDomain Code=-1 "The operation couldn’t be completed. (POSIX error -1 - Unknown error: -1)"
I guess this warning describes the reason of the problem. But what does that message mean?
I also tried to add com.apple.managedconfiguration.profiled-access
key with true
value to entitlements when signing the app, but it ended up with the error:
installd[420] : 0x41d000 -[MICodeSigningVerifier performValidationWithError:]: 188: Failed to verify code signature of : 0xe8008016 (Entitlements found that are not permitted by provisioning profile)