I am using Appium on a Mac, with iOS devices.
I have a web service which needs to be notified when I begin running tests on my device. To send this request the web service (from my Mac), I require the UDID (of the iOS device) for the web service to recognize it.
To do this, there are 2 ways, I believe.
Method 1:
Some way to get the plugged in devices UDID from within the Appium code. Is there a command for this? I don't know if this is possible but I'm hoping it is.
Method 2:
I already have my own iOS app which can get the UDID/serial number but I have no way of transferring this to Appium. How about saving this number to the devices clipboard via my app, and then can Appium get the contents of the clipboard as a String? Or how about getting my iOS app to save the UDID using Shared User Defaults. Can Appium access these key value pairs?
Any advice would be great.
Edit:
To be clear, I wish to get the UDID of the device in which the test case is currently running on, via the Appium source code. I do not wish to get the UDID's of all the devices connected to the Mac. Is this possible?