I’m looking for a supported way to programmatically install a specific build of an app distributed through TestFlight on a test device.
My goal is to automate UI testing with XCUITest (via Appium): select a particular TestFlight build, install or update the app, and then run tests against that exact version. Is there an Apple-provided API, command-line tool, or recommended workflow for doing this? If not, is there a reliable way to automate the TestFlight app’s installation flow, including targeting a specific build?
I also want to be able to automatically reinstall the app so I can isolate between multiple tests.
I’m especially interested in whether this is supported on physical devices in CI and whether the answer differs for internal versus external TestFlight builds.