Updating Configuration Profile installed in iOS device in MDM
Asked Answered
P

3

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

Pitiable answered 14/3, 2012 at 8:29 Comment(3)
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 <data> tag?Pitiable
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.Donovan
Hi @Donovan . I am also trying to build MDM for iOS devices in PHP. I have done all the certification parts from here 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.Spangler
C
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.

Coray answered 15/3, 2012 at 11:31 Comment(1)
Abstractec,, my email id is [email protected] .. Please if you could help me.. I will be very grateful to you.. ThanksPitiable
E
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>
Elam answered 4/6, 2012 at 18:17 Comment(2)
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 : MCFatalErrorForeshow
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 <?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\"> your encode must start from <plist version="1.0"> ... till </plist>Toname
H
0

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

Hobie answered 11/4, 2012 at 4:41 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.