title: Getting a device UDID from .mobileconfig
body: <p>I'm trying to write function similar to <a href="http://whatismyudid.com/" rel="noreferrer">http://whatismyudid.com/</a> that, then approved, will return the users UDID and store it to a database for future reference with that user.</p>
  
  <p>I have written a .mobileconfig xml doc that opens in the Profile Installer just fine but when I tell it to install the profile it responds with <code>[alert] Invalid Profile</code> but no alert body. No description, no code, no help.</p>
  
  <p>I'm new to the mobile configuration game so any help would thrill me.</p>
  
  <p>Here is my configuration file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt;
  &lt;plist version="1.0"&gt;
  &lt;dict&gt;
      &lt;key&gt;PayloadContent&lt;/key&gt;
      &lt;dict&gt;
          &lt;key&gt;URL&lt;/key&gt;
          &lt;string&gt;http://apps.mortlabs.com/device/retrieve.php&lt;/string&gt;
          &lt;key&gt;DeviceAttributes&lt;/key&gt;
          &lt;array&gt;
              &lt;string&gt;UDID&lt;/string&gt;
              &lt;string&gt;IMEI&lt;/string&gt;
              &lt;string&gt;ICCID&lt;/string&gt;
              &lt;string&gt;VERSION&lt;/string&gt;
              &lt;string&gt;PRODUCT&lt;/string&gt;
          &lt;/array&gt;
      &lt;/dict&gt;
      &lt;key&gt;PayloadOrganization&lt;/key&gt;
      &lt;string&gt;MortLabs.com&lt;/string&gt;
      &lt;key&gt;PayloadDisplayName&lt;/key&gt;
      &lt;string&gt;Profile Service&lt;/string&gt;
      &lt;key&gt;PayloadVersion&lt;/key&gt;
      &lt;integer&gt;1&lt;/integer&gt;
      &lt;key&gt;PayloadUUID&lt;/key&gt;
      &lt;string&gt;B958E359-34C2-42F4-BD0C-C985E6D5376B&lt;/string&gt;
      &lt;key&gt;PayloadIdentifier&lt;/key&gt;
      &lt;string&gt;com.mortlabs.profile-service&lt;/string&gt;
      &lt;key&gt;PayloadDescription&lt;/key&gt;
      &lt;string&gt;This temporary profile will be used to find and display your current device's UDID.&lt;/string&gt;
      &lt;key&gt;PayloadType&lt;/key&gt;
      &lt;string&gt;Profile Service&lt;/string&gt;
  &lt;/dict&gt;
  &lt;/plist&gt;
  </code></pre>
  
  <p>The profile is initialized by navigating to <a href="http://apps.mortlabs.com/device/enroll.php" rel="noreferrer">http://apps.mortlabs.com/device/enroll.php</a> with mobile safari</p>