r/iosdev • • Oct 18 '26

Help iPhone Duo-Testautomatisierung

/r/iosapps/comments/1x99u36/iphone_duo_test_automation/
2 Upvotes

2 comments sorted by

2

u/Fickle-Difference882 Oct 18 '26

Ran into the same wall. As far as I could find there's no way to fold the Duo simulator from a script. simctl and XCTest can't do it, only the DeviceHub app can. What made it bearable for screenshots:

  • Fold or unfold by hand in DeviceHub once per pose, then let the script do everything for that pose (all screens, all languages). That way you only touch it once per pose per run instead of once per screen.
  • Don't tap through the UI to reach each screen. Synthetic taps were unreliable on the Duo simulator for me, so I launch with arguments that open the screen I want, or seed the state first with xcrun simctl spawn <udid> defaults write <bundle id> ..., then capture.
  • Each display is its own screen, so capture them separately. xcrun simctl io <udid> enumerate gives you the display UUIDs, then xcrun simctl io <udid> screenshot --display=<UUID> --mask=black shot.png.

Doesn't solve real UI testing in every pose, but it cuts the manual part down to a few clicks.

1

u/DetlevD Oct 19 '26

Thanks for the explanations, I will try it right away! This will be a great a great step forward.