There are already some public websites that allow you to get your UDID from them if you Google, but if you don’t trust them or want to make your own, here is my guide:

device.mobileconfig

Change the URL, PayloadOrganization, PayloadUUID andPayloadIdentifier.

<?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://webbersky.com/udid/process/</string>
    <key>DeviceAttributes</key>
    <array>
        <string>UDID</string>
        <string>DEVICE_NAME</string>
        <string>VERSION</string>
        <string>PRODUCT</string>
    </array>
</dict>
<key>PayloadOrganization</key>
<string>WebberSky</string>
<key>PayloadDisplayName</key>
<string>Get UDID</string>
<key>PayloadVersion</key>
<integer>1</integer>
<key>PayloadUUID</key>
<string>9CF421B3-1337-4354-BC8A-182BAD3C907C</string>
<key>PayloadIdentifier</key>
<string>com.webbersky.getUDID</string>
<key>PayloadDescription</key>
<string>UDID for iOS Device</string>
<key>PayloadType</key>
<string>Profile Service</string>
</dict>
</plist>

udid/index.php

<?php
$name_file = "device.mobileconfig";
$file = fopen($name_file, "r");
header("Content-type: application/x-apple-aspen-config; chatset=utf-8");
header("Content-Disposition: attachment; filename=\"$name_file\"");
echo fread($file,filesize($name_file));
?>

process/index.php

<?php
$data = file_get_contents('php://input');
$plistBegin   = '<?xml version="1.0"';
$plistEnd   = '</plist>';
$pos1 = strpos($data, $plistBegin);
$pos2 = strpos($data, $plistEnd);
$data2 = substr ($data,$pos1,$pos2-$pos1);
$xml = xml_parser_create();
xml_parse_into_struct($xml, $data2, $vs);
xml_parser_free($xml);
$UDID = "";
$DEVICE_PRODUCT = "";
$DEVICE_VERSION = "";
$DEVICE_NAME = "";
$iterator = 0;
$arrayCleaned = array();
foreach($vs as $v){
    if($v['level'] == 3 && $v['type'] == 'complete'){
        $arrayCleaned[]= $v;
    }
    $iterator++;
}
$iterator = 0;
foreach($arrayCleaned as $elem){
    switch ($elem['value']) {
        case "UDID":
            $UDID = $arrayCleaned[$iterator+1]['value'];
            break;
        case "PRODUCT":
            $DEVICE_PRODUCT = $arrayCleaned[$iterator+1]['value'];
            break;
        case "VERSION":
            $DEVICE_VERSION = $arrayCleaned[$iterator+1]['value'];
            break;
        case "DEVICE_NAME":
            $DEVICE_NAME = $arrayCleaned[$iterator+1]['value'];
            break;
    }
    $iterator++;
}
$params = "UDID=".$UDID."&DEVICE_PRODUCT=".$DEVICE_PRODUCT."&DEVICE_VERSION=".$DEVICE_VERSION."&DEVICE_NAME=".$DEVICE_NAME;
header("Location: show_detail.php?".$params,TRUE,301);
?>

process/show_detail.php

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>UDID</title>
        <meta name="viewport" content="width=device-width" />
        <script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script>
    </head>
    <body>
        <div>
            <h1>UDID of my iOS device</h1>
                <p>UDID: <div id="udid"><?php echo $_GET['UDID']; ?></div></p>
                <button class="btn" data-clipboard-text="<?php echo $_GET['UDID']; ?>">
            Copy UDID
        </button>
                <p>Device product: <?php echo $_GET['DEVICE_PRODUCT']; ?></p>
        </div>
    </body>
<script>
    new ClipboardJS('.btn');
</script>
</html>

Upload device.mobileconfig, udid/index.php, process/index.php, process/show_detail.php

See it in action  – https://webbersky.com/udid/ (View on iOS Device)

You can then serve the App (*.ipa) file over OTA for example.

Optional: (Signing .mobileconfig)

You’ll need a SSL certificate.

cert.pem, certchain.pem and key.pem (self explanatory)

openssl smime -sign -signer cert.pem -inkey key.pem -certfile certchain.pem -nodetach -outform der -in device.mobileconfig -out signed.mobileconfig

 

 

Categories: General

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.