Open your simulator, choose Hardware - devices - manage devices. You will find the identifier in device information.
You'll need to go to Settings > Advanced and check the Show Debug Menu option. Then you'll see the option to open the web inspector for the Simulator right from that menu. With the Web Inspector open, you can debug inside the Simulator just like you could right in a desktop browser with DevTools.
Open up a project in Xcode and click on the device near the Run ▶ button at the top left of your Xcode screen. Plug your iPhone into your computer. You can select your device from the top of the list. Unlock your device and (⌘R) run the application.
Try this
instruments -s devices
EDIT: See other answers for the newer ways to view UDIDs for CoreSimulator
-based simulators.
instruments -s devices
xcrun simctl list
Identifier
value is the UDID.From 2011:
Is the iPhone Simulator UDID unique for each installed instance?
This answer should be what you want. Look at System Profiler on your mac and the id is there. I just tested on my machine and the IDs match.
This is the exact Terminal command you can enter to view it:
system_profiler SPHardwareDataType
As so often, there is a Xcode terminal tool for that (part of the Xcode tools) see xcrun manpage
xcrun simctl list | egrep '(Booted)'
lists only all booted (could be more than one) Simulators
(remove | egrep '(Booted)'
to see them all).
UIID results like
iPhone 6 Plus (AAAABD40-9DE6-44B7-A4EA-B34ABCDEFCA6) (Booted)
you can then lookup a folder in ~/Library/Developer/CoreSimulator/Devices
on your Mac and find all the "belongings" of that particular Simulator
You can also retrieve the same UDID, labeled as "Identifier". In the Xcode Window menu, select Devices and Simulators: then select the Simulators tab:
Xcode -> Window -> Devices and Simulators -> Select Device for which you want identifier (Inside details you can see identifier)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With