in

Getting UDID from IOS device using php


I created and signed a .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://example.com/register/process</string>
            <key>DeviceAttributes</key>
            <array>
                <string>UDID</string>
                <string>DEVICE_NAME</string>
                 <string>IMEI</string>
                <string>ICCID</string>
                <string>VERSION</string>
                <string>PRODUCT</string>
            </array>
        </dict>
        <key>PayloadOrganization</key>
        <string>xxx</string>
        <key>PayloadDisplayName</key>
        <string>Profile Service</string>
        <key>PayloadVersion</key>
        <integer>1</integer>
        <key>PayloadUUID</key>
        <string>uuidhere</string>
        <key>PayloadIdentifier</key>
        <string>com.xxx.profile-service</string>
        <key>PayloadDescription</key>
        <string>xxx device registration</string>
        <key>PayloadType</key>
        <string>Profile Service</string>
    </dict>
</plist>

The process folder has a simple index.php file

<?php
//get data
$data = file_get_contents('php://input');
echo "Received data is ".$data;
?>

When I install the mobileconfig it correctly redirects to my index.php but returns no data.
When I test it with curl curl -X POST https://example.com/register/process -d ‘testing’ it returns correctly “Received data is testing”

I used to have a working system but it no longer works for some unknown reason.
In my old version the url in the .mobileconfig pointed directly to my php script.
Now if I point directly to my “receiving” php file it fails with an error message “A connection to the server could not be established”

Funny thing is that if I set the url in my mobileconfig to https://showmyudid.com/showmyudid.php it will display the udid

So it should work with a direct link to the php script.

I must be missing something obvious here…



Source: https://stackoverflow.com/questions/70627651/getting-udid-from-ios-device-using-php

Browser-based ETH vanity address generator with vue.js

a small helper tool to configure functions for Ultimaker S-Line printers