mobileconfig獲取udid

首先新建一個mobileconfig文件

<?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>PayloadContent</key>
        <dict>
            <key>URL</key>
            <string>https://.test.security.com/security.php</string>
            <key>DeviceAttributes</key>
            <array>
                <string>UDID</string>
                <string>IMEI</string>
                <string>ICCID</string>
                <string>VERSION</string>
                <string>PRODUCT</string>
            </array>
        </dict>
        <key>PayloadOrganization</key>
        <string>BBC, Inc.</string>
        <key>PayloadDisplayName</key>
        <string>獲取udid</string>
        <key>PayloadVersion</key>
        <integer>1</integer>
        <key>PayloadUUID</key>
        <string>9CF421B3-9853-4458-BC8A-982CBD3C912C</string>
        <key>PayloadIdentifier</key>
        <string>com.gpon.profile-service</string>
        <key>PayloadDescription</key>
        <string>This temporary profile will be used to find and display your current device's setting.</string>
        <key>PayloadType</key>
        <string>Profile Service</string>
    </dict>
</plist>

然后服務端提供三個文件 ca.crt server.crt server.key


屏幕快照 2019-09-26 上午11.36.05.png

簽名加密 就ok了

openssl smime -sign -in testsecurity.mobileconfig -out testsecurity1.mobileconfig -signer server.crt -inkey server.key -certfile ca.pem -outform der -nodetach

錯誤提示:ios12 http會報錯 url換成https顯示"發生 SSL 錯誤,無法建立到該服務器的安全連接" 解決方法:https 服務器配置的證書不對 蘋果要求的是TLS1.2的

參考
http://www.rootmanager.com/iphone-ota-configuration/iphone-ota-setup-with-signed-mobileconfig.html

最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。