5

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!!!

Manmay
  • 539
  • 2
  • 12
  • 28
  • I found that I need to use InstallProfile.. But what should be the data within the Payload tag.. Its specified as '(data) IPCU .mobileconfig file, base-64 encoded', but do I need to copy the complete xml of config profile into the tag? – Manmay Mar 14 '12 at 11:58
  • Hi, I have been trying to do MDM in iOS, but i don't find any API (I saw the PDF). Do you think you can help me with it? That would be very useful if you can help me with a few pointers. – nithinreddy Apr 01 '12 at 05:17
  • Hi @nithinreddy . I am also trying to build MDM for iOS devices in PHP. I have done all the certification parts from here https://github.com/project-imas/mdm-server. I have created created .mobileconfig profile. I am not able to get what to do now. Please help me. – sau Jun 08 '15 at 09:05

3 Answers3

4

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.

Abstractec
  • 656
  • 8
  • 15
  • Abstractec,, my email id is manmays@gmail.com .. Please if you could help me.. I will be very grateful to you.. Thanks – Manmay Mar 16 '12 at 11:44
3

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>
Seth
  • 51
  • 3
  • Can you suggest an online Base64 decoder that does this job perfectly? I tried a couple of them but I get the >>>>>> MC: Failed to parse profile data. Error: NSError: Desc : Invalid Profile US Desc: Invalid Profile Domain : MCProfileErrorDomain Code : 1000 Type : MCFatalError – Sahil Khanna Oct 09 '12 at 14:05
  • Just a note to every one struggling with this `Error 1000 Invalid Profile` when trying to restrict apps or device usage. _REMOVE_ the XML from your plist with your restrictions! Do **NOT** encode this part ` ` your encode **must** start from `` ... till `` – dazito Apr 22 '16 at 14:53
0

Remove the XML declarations. Encode64 your plist data (....).

zoom
  • 160
  • 1
  • 1
  • 11