iPhone赢得';安装.mobileconfig文件后,无法传递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,但当页面加载时两者都是空的。我已经确定页面实际上正在加载,因为我可以在PHP文件中echo东西,它们就会显示出来。是不是我明显做错了什么?

如果我正确理解问题,那么您希望将应用程序本身(或其他东西)管道传输到输出缓冲区。为此,你会想要php://output.

您可以使用stream_copy_to_stream很快完成一行:stream_copy_to_stream(file://...,php://output);

如果不是这样的话,请让我知道我在你的描述中遗漏了什么。

数据通过POST发送。

print_r($_POST);

您应该看到正在发送的