发送MDM命令后,设备不发送任何内容

时间:2012-06-12 14:51:51

标签: c# ios apple-push-notifications mdm

我已成功设法向设备发送MDM推送通知,设备以空闲状态响应。但是,当我发送MDM命令时:

<?xml version=\"1.0\" encoding=\"utf-16\"?>
<!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>4FB2550B-ADFD-425C-BF6C-92CEDE747F23</string>
    <key>Command</key>
    <dict>
      <key>RequestType</key>
      <string>InstalledApplicationList</string>
    </dict>
  </dict>
</plist>

设备不包含任何响应。它以某种方式关闭连接。我正在编写XML,然后读取流以检查同一连接上的响应。当我关闭连接然后重新发送推送通知时,我得到了这个空响应:

PUT / HTTP/1.1
Host: 172.18.130.31:1234
User-Agent: MDM/1.0
Content-Length: 0
Accept: */*
Content-Type: application/x-apple-aspen-mdm
Accept-Language: en-us
Accept-Encoding: gzip, deflate
Connection: keep-alive

我也尝试过设备信息,但无济于事:

<!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>7C28313A-BFE7-4430-A516-BB16C8F6F750</string>
    <key>Command</key>
    <dict>
      <key>RequestType</key>
      <string>DeviceInformation</string>
      <array>
        <string>DeviceName</string>
        <string>OSVersion</string>
        <string>BuildVersion</string>
        <string>ModelName</string>
        <string>Model</string>
        <string>ProductName</string>
        <string>SerialNumber</string>
        <string>DeviceCapacity</string>
        <string>AvailableDeviceCapacity</string>
        <string>BatteryLevel</string>
        <string>CellularTechnology</string>
        <string>IMEI</string>
        <string>MEID</string>
        <string>ModemFirmwareVersion</string>
      </array>
    </dict>
  </dict>
</plist>

应该发送已确认状态或至少发送错误。我做错了什么?

2 个答案:

答案 0 :(得分:0)

我解决了这个问题。我在发送的XML plist中编码为16而不是8。

答案 1 :(得分:0)

我也有这种症状,虽然我的问题不同。

您不应该签署XML。