Getting a Device Udid from .Mobileconfig

Getting a device UDID from .mobileconfig

I found that by using the above that Apache was being talked to by the Ipad/Iphone - The post by Kyle2011 at https://discussions.apple.com/thread/3089948?start=0&tstart=0 filled in the rest of the solution.

Basically at the bottom of the retrieve.php page you need to redirect the browser to a directory by using a line similar to the following:-

header("Location: https://www.example.com/enrolment?params={$params}");

Where enrolment is a directory - this then calls the DirectoryIndex (typically index.php) which can then display stuff to your user.

To populate the $params variable you need the following line at the top of your retrieve.php script

$data = file_get_contents('php://input');

You can then parse the $data string to get what you need (try file_put_contents("data.txt", $data); or Kyle2011's example)

I also changed the Payload UDID to something different by using udidgen in a terminal on a Mac rather than just using whatismyudid.com's.

Update: From iOS 7.1 some of the files (the .plist IIRC) need to be served over https:// - they will fail to install if everything is served over http:// - probably best to serve everything including the .ipa over https:// to ensure future changes on Apple's side don't cause a problem.

Link A .mobileconfig To A UDID

I am not sure what do you mean by linking created mobile config file with device UDID but there are few ways to have unique mobile config for each device:

  1. You can send your UDID ([NSUUID UUID]) as a request parameter to the server - generate mobile config file on the server side with script (python is recommended here) and return it to the user. Here's example of lib that does it:

    https://github.com/scj643/iOS-Profile-Lib.

  2. Redirect user to safari and use this solution:

    http://www.cuelogic.com/blog/getting-an-iphone-udid-from-mobile-safari/.

  3. You can generate/modify a pattern of this profile in your application without using server. Then use GCDServer and run Safari linking your profile available via GCDServer.

How do Fabric get the iOS UDID of a iOS device?

To get UDID from device you need to install an .mobileconfig on this device. It works the following way:

  1. Users request a .mobileconfig file with proper configuration from your server to his or her iDevice.
  2. iOS detects .mobileconfig and opens it in Settings Application.
  3. If user allows installation of this profile then iOS returns response with UDID and other information to the URL that is defined in the mobileconfig. Usually this URL points to your web server.

This is the short explanation. You can find full version with file examples & etc here and in the referenced articles:
https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/iPhoneOTAConfiguration/ConfigurationProfileExamples/ConfigurationProfileExamples.html#//apple_ref/doc/uid/TP40009505-CH4-SW1

Get an iPhone UDID from Mobile Safari

Apple Server plays no role while you retrieve the UUID from the device by the above method mentioned in your question.

You can check this by creating a hotspot and connect both your phone and the server which serve the .mobileconfig file to the hotspot.
install the provision file on your phone and it will send back the response to the URL mentioned in the .mobileconfig file.

tip: you have to install trust certificate before installing the .mobileconfig file.

get mac address from mobileconfig on iOS device


That attribute was deprecated in iOS 4, and has been removed in iOS 5.
There is no replacement for it.

  • https://discussions.apple.com/thread/3464303?start=0&tstart=0
  • http://iphone.vv44.net/thread-18361-1-1.html
  • https://stackoverflow.com/questions/11555386/ios-device-enrollment-challange

Read UDID from Iphone with javascript on mobile safari

Update 2:

Since the site below is dead already, this discussion thread in apple.com's forum has the diagnosis and source code on how did that site retrieve the UDID thru mobileconfig.

https://discussions.apple.com/thread/3089948?start=0&tstart=0


Update: the site mentioned in this answer is no longer on-line; it's now just a placeholder full of ads. Leaving original message below for reference.


Open http://whatismyudid.com/ in your iOS device

it is possible through mobileconfig (Over-the-Air Profile Delivery and Configuration)

http://whatismyudid.com/device/start <- download their mobileconfig and take a look

Install Profile Service - Profile Installation Failed (Get UDID from iOS)

After searching high and low I found this comment by Lakitu which said to do a 301 redirect.

If anyone is interested here is the code I used for redirecting:

        context.Response.Status = "301 Moved Permanently";
context.Response.AddHeader("Location", "/device/enroll.aspx");
context.Response.End();

I read that you needed to redirect to a directory, but any file seems fine.

Happy coding!

Is there a way since (iOS 7's release) to get the UDID without using iTunes on a PC/Mac?

Here's my research results:

Apple has hidden the UDID from all public APIs, starting with iOS 7. Any UDID that begins with FFFF is a fake ID. The "Send UDID" apps that previously worked can no longer be used to gather UDID for test devices. (sigh!)

The UDID is shown when a device is connected to XCode (in the organizer), and when the device is connected to iTunes (although you have to click on 'Serial Number' to get the Identifier to display.

If you need to get the UDID for a device to add to a provisioning profile, and can't do it yourself in XCode, you will have to walk them through the steps to copy/paste it from iTunes.

UPDATE -- see okiharaherbst's answer below for a script based approach to allow test users to provide you with their device UDIDs by hosting a mobileconfig file on a server



Related Topics



Leave a reply



Submit