Delivering MDM DeviceLock Payload

白昼怎懂夜的黑 提交于 2019-12-03 06:10:00

问题


We were able to get an response with Status as Idle after send the first payload as mdm:. Now we want to send a simple device lock payload. we followed the exact same process to send the payload but the response returned was blank.

We are following the certificate use as follows: 1. On the MDM server, To send mdm commands we use MDM Vendors APNS certificate with identifier as com.apple.mgmt.myapp.(This identifier is set as topic in configuration profile). 2. In the configuration profile, we are setting the credentials as the p12 file which is returned by the MDM Client.

I am getting the below error..: MC|Failed to parse profile data. Error:

    NSError 0x1c58c2f0:
    Desc   : Invalid Profile
    US Desc: Invalid Profile
    Domain : MCProfileErrorDomain
    Code   : 1000
    Type   : MCFatalError


    <Warning>: MDM|Command Status: Error
    Error: NSError 0x1c58c2f0:
    Desc   : Invalid Profile
    US Desc: Invalid Profile
    Domain : MCProfileErrorDomain
    Code   : 1000
    Type   : MCFatalError

回答1:


You do not send the device lock profile using APNS. The device 'phones home' after it receives the MDM payload via APNS and your server sends back XML (NOT JSON!) to the device containing the device lock command.




回答2:


The payload should be Base64 encoded of *.mobileconfig file content, with the top level 'dict' node.

The actual xml sent to device is defined in the iOS MDM protocol reference. The command type is 'InstallProfile'




回答3:


If the device sends 'Idle' then it means you are correctly waking up the device using your APNS. Next all you would need is to send DeviceLock command to device. Its need not be base64 encoded , just send this plist response and check .

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>CommandUUID</key>
    <string>DeviceLock</string>
    <key>Command</key>
    <dict>
        <key>RequestType</key>
        <string>DeviceLock</string>
        <key>Message</key>
        <string>Locking the device. Contact +91 9999999999</string>
    </dict>
</dict>
</plist>


来源:https://stackoverflow.com/questions/9534400/delivering-mdm-devicelock-payload

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!