我在DeviceInformation命令上收到“ CommandFormatError”。
这就是我作为DeviceInformation命令发送的内容:
<?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>Command</key>
<dict>
<key>RequestType</key>
<string>DeviceInformation</string>
</dict>
<key>CommandUUID</key>
<string></string>
</dict>
</plist>
最佳答案
MDM API文档对此功能有些含糊。实际上,您需要查询希望从设备接收的每个值。这是查询iOS设备可能具有的所有值的示例。没有特定功能的设备(例如iPod Touch将没有3g连接,因此没有运营商相关信息)将返回为空值。
<?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>Command</key>
<dict>
<key>RequestType</key>
<string>DeviceInformation</string>
<key>Queries</key>
<array>
<string>AvailableDeviceCapacity</string>
<string>BluetoothMAC</string>
<string>BuildVersion</string>
<string>CarrierSettingsVersion</string>
<string>CurrentCarrierNetwork</string>
<string>CurrentMCC</string>
<string>CurrentMNC</string>
<string>DataRoamingEnabled</string>
<string>DeviceCapacity</string>
<string>DeviceName</string>
<string>ICCID</string>
<string>IMEI</string>
<string>IsRoaming</string>
<string>Model</string>
<string>ModelName</string>
<string>ModemFirmwareVersion</string>
<string>OSVersion</string>
<string>PhoneNumber</string>
<string>Product</string>
<string>ProductName</string>
<string>SIMCarrierNetwork</string>
<string>SIMMCC</string>
<string>SIMMNC</string>
<string>SerialNumber</string>
<string>UDID</string>
<string>WiFiMAC</string>
<string>UDID</string>
</array>
</dict>
<key>CommandUUID</key>
<string>94d45445-bf54-42df-9777-6280783b49e7</string>
</dict>
</plist>