I have a cocoa application. I need to retrieve the UDID of the iPhone connected to machine using cable. Is there any way to programatically discover iOS devices connected to Mac OS X machine in cocoa application?
Asked
Active
Viewed 2,764 times
4 Answers
2
MacOS 10.15.x:
xcrun xctrace list devices
Outputs:
== Devices ==
MACOS device itself (xxxxxxxxx-xxxxxx-xxxx-xxxxx-xxxxxxxxx)
iPhone (16.2) (yyyyy-xxxxxxxxxxxxxxxxxxx)

Adriaan
- 17,741
- 7
- 42
- 75

Andrei Bovsev
- 21
- 2
0
It isn't possible to get UDID programatically. Since iOS 5 Apple has removed access to UDID. Kindly refer to the following where this has already been discussed. Get UDID of IOS device programmatically?

Vakas
- 6,291
- 3
- 35
- 47
0
Connect your device to Mac and open iTunes. Then click on the symbol of the device. It will show the UDID of the device.
And if you want to get UDID programmatically please refer this link. How to get a unique device ID in Swift?

swapnil patel
- 384
- 2
- 17
0
In case you want it without programmatically,
Connect the iPhone to the Mac, open the iTunes, click this button marked with red
After that in the screen you're getting, click on the serial number in the area marked with red here, you'll get the UDID

ZameerMoh
- 1,149
- 1
- 17
- 26
-
-
UDID is no longer available in iOS 6+ due to security / privacy reasons. Instead, use identifierForVendor or advertisingIdentifier. try this: https://stackoverflow.com/questions/25925481/how-to-get-a-unique-device-id-in-swift – ZameerMoh Dec 20 '17 at 05:47
-
-
1implemeted using terminal command "instruments -s devices | grep -v \"Simulator\"" and split the details – Dec 20 '17 at 07:08