I want to add an iPhone XS UDID in the Apple developer portal but I am unable to find the UDID in iTunes and without adding the UDID I am unable to run my app on the iPhone
Must be update to XCode10 and click Window -> Devices & Simulators -> Select your iPhone -> Use the "identifier"
Considering you are using macOS catalina, and there is no iTunes any more, you may do the following:
Use terminal "system_profiler" to find the UDID for attached devices
If you're comfortable using Terminal, you can paste this command in to Terminal or save it as a script or alias.
system_profiler SPUSBDataType -detailLevel mini | \
grep -e iPhone -e Serial | \
sed -En 'N;s/iPhone/&/p'
Paste that text into Terminal and press enter to run system_profiler for the USB devices, and then filter for only the iPhone's UDID from the pretty-long output. Again, be sure to add the necessary hyphen after the first eight digits for iPhone XS and XS Max devices.
output on terminal:
$ system_profiler SPUSBDataType -detailLevel mini | \
grep -e iPhone -e Serial | \
sed -En 'N;s/iPhone/&/p'
Output:
2018-10-25 12:57:06.527 system_profiler[23461:6234239] SPUSBDevice:
IOCreatePlugInInterfaceForService failed 0xe0003a3e
iPhone:
Serial Number: 3aeac....4145
Ignore following failures
2018-10-25 12:57:06.527 system_profiler[23461:65234239] SPUSBDevice: IOCreatePlugInInterfaceForService failed 0xe0003a3e
Look for Serial Number: 3aeac........4145
Alias:
# find UDID
alias fudid="system_profiler SPUSBDataType -detailLevel mini | grep -e iPhone -e Serial | sed -En 'N;s/iPhone/&/p'"
From: https://deciphertools.com/blog/2014_11_19_how_to_find_your_iphone_udid/
For the iPhone XS/XS Max and possibly other iPhones which do not show UUID in Itunes: - Open Xcode - Window -> Devices & Simulators -> Select your iPhone -> Use the "identifier" as shown below:
1.Connect iPhone to Mac
2.Go to About This Mac
3.Click on "System Report" and select "USB" from left panel.
4.Find your iphone and look for the "Serial Number" field. This is what you need.
5.Copy this "Serial Number" and register the device in the developer portal. Make sure developer portal recognizes the device model. (As the developer portal recognizes the device model for a valid UDID when registering the device).
Open Xcode -> Window -> Devices & Simulators -> Select your iPhone -> Identifier
Copy the value for Identifier. This is the UDID