繁体   English   中英

安装.mobileconfig文件后,iPhone不会传递Web应用程序请求的数据

[英]iPhone won't pass web app requested data after installing .mobileconfig file

我正在编写一个Web应用程序,它请求使用带有.mobileconfig文件的用户UDID,其格式如下:

<!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://example.com/profile/enroll</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>www.example.com</string>
        <key>PayloadDisplayName</key>
        <string>Profile Service</string>
        <key>PayloadVersion</key>
        <integer>1</integer>
        <key>PayloadUUID</key>
        <string>3956C530-18F0-4B3D-B4C5-XXXXXXXXXXXX</string>
        <key>PayloadIdentifier</key>
        <string>com.example.profile-service</string>
        <key>PayloadDescription</key>
        <string>This temporary profile will be used to find and display your current device's UDID.</string>
        <key>PayloadType</key>
        <string>Profile Service</string>
    </dict>
</plist>

我使用与SSL相同的证书对此配置文件进行了签名,并在用户单击配置文件时显示为已验证。 但是,在选择安装配置文件后,没有数据传回我的服务器。 我尝试过使用'php://input'$HTTP_RAW_POST_DATA但是当页面加载时它们都是空的。 我已经确定该页面实际上正在加载,因为我可以echo显PHP文件中的内容并显示它们。 有什么东西我显然做错了吗?

如果我正确理解了这个问题,那么你需要将应用程序本身(或其他东西)传递给输出缓冲区。 为此,你需要php://输出

你可以使用stream_copy_to_stream快速完成一个单行程 :stream_copy_to_stream(file:// ...,php:// output);

如果情况并非如此,请告诉我您的描述中缺少的内容。

数据通过POST发送。

print_r($_POST);

你应该看看发送了什么

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM