Appium iOS Automation: Different UDID Results on Jenkins and Local Mac Using xcrun simctl list devices

Hi everyone,

I’m using Python for Appium automation on iOS, and I have encountered an issue when running xcrun simctl list devices. When I execute this command on Jenkins, the list of devices and UDIDs are different compared to when I run it locally on my Mac.

Has anyone experienced this issue before or know why this discrepancy might occur between Jenkins and my local Mac? Any advice on how to troubleshoot this or fix the mismatch?

Thanks in advance!

Maybe helps… year ago I have some issues with xcrun when multiple devices connected to macMini. As workaround I switched to

ios-deploy -c -t 5 -W

BTW jenkins executing command on some machine when SAME phones connected like you trying locally with your mac?

PPS Note that xcrun also showing Simulators which possibly may be confused with real devices. Simulators have different UDID on different computers.

@Aleksei

Thank you for your response. I am only using simulators to run iOS automation, and there are 2 simulators with a booted status. I am running Jenkins to remotely access my local Mac Mini. When I use commands such as xcrun simctl privacy grant location locally on my Mac Mini, and execute it through the Jenkinsfile, the device list returned is different. I have also tried using ios-deploy, but it didn’t detect anything because I am using simulators. Could you help me understand why this is happen?

aga. So we have SAME machine. It is left to know how Jenkins connected to it? Using YOUR user credential or some other user created on your machine for jenkins?
In second case when we have TWO different users each user has it own simulators!