I want to send a configuration payload to a device. Eg. I want to send a restriction payload (Disallow safari) to a particular device. i.e. I want to update the configuration profile installed on the device.
Do I need to send this configuration profile payload same way as I send the query payloads?
Do I need to include all the configuration payloads of the configuration profile which exists on the device? OR Just need to send the one I need to update.
Please help!!!
It needs to be the contents of the containing the PayloadContent of the profile you wish to install which has been Base64 encoded.
You don't need all the XML, just the first block.
To be clear, the DATA section should contain the base64 encoded (UTF8) string of everything starting with the plist tags in the mobiliconfig from IPCU to the end /plist tag
<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<!DOCTYPE plist PUBLIC \"-//Apple Computer/DTD PLIST 1.0//EN\"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">
<plist version=\"1.0\">
<dict>
<key>CommandUUID</key>
<string>c22d6f22-d222-4477-9e6e-5886e5f1e2a1</string>
<key>Command</key>
<dict>
<key>RequestType</key>
<string>InstallProfile</string>
<key>Payload</key>
<data>base64encode("<plist>...</plist")</data>
</dict>
</dict>
</plist>
Remove the XML declarations. Encode64 your plist data (....).
来源:https://stackoverflow.com/questions/9698228/updating-configuration-profile-installed-in-ios-device-in-mdm