Skip to main content
bash TV

Run XCUITest on a Real iPhone: xcodebuild to .ipa

TestMu AI (Formerly LambdaTest)

26 Nov 2026

YouTube

Run XCUITest on a real iPhone in 3 steps: build for testing, package two .ipa files, upload and run. πŸ“’ TestMu AI Real Device Cloud: real device testing on 50,000+ iOS and Android devices. Run XCUITest, Appium, or Espresso, live or automated, without a device lab. What you'll get: βœ… xcodebuild build-for-testing for a generic iOS device βœ… Turn MyApp.app + MyAppUITests-Runner.app into two .ipa files (Payload folder trick) βœ… Upload both with type xcuit-ios, then start the run on a real iPhone 16 / iOS 18 βœ… Result: 4/4 tests passed, with video and device logs captured πŸ”— Start free on TestMu AI: https://www.testmuai.com/real-device-cloud/ πŸ“˜ XCUITest docs: [ADD LINK] COMMANDS 1) Build xcodebuild build-for-testing \ -scheme MyApp \ -destination 'generic/platform=iOS' \ -derivedDataPath build 2) Package cd build/Build/Products/Debug-iphoneos mkdir Payload && cp -r MyApp.app Payload/ zip -r MyApp.ipa Payload && rm -rf Payload mkdir Payload && cp -r MyAppUITests-Runner.app Payload/ zip -r MyAppUITests.ipa Payload && rm -rf Payload 3) Upload (run once per .ipa, save each lt:// ID) curl -u "$LT_USERNAME:$LT_ACCESS_KEY" \ -X POST "https://manual-api.lambdatest.com/app/uploadFramework" \ -F "appFile=@MyApp.ipa" -F "type=xcuit-ios" 4) Run on a real iPhone curl -u "$LT_USERNAME:$LT_ACCESS_KEY" \ -X POST "https://mobile-api.lambdatest.com/framework/v1/xcui/build" \ -H "Content-Type: application/json" \ -d '{"app":"lt://APP_ID","testSuite":"lt://SUITE_ID","device":["iPhone 16-18"],"video":true,"devicelog":true}' Tip: give both targets the same iOS Deployment Target. "iPhone 16-18" = iPhone 16 on iOS 18. CHAPTERS 0:00 XCUITest on a real iPhone: the result 0:12 Step 1: xcodebuild build-for-testing 0:24 Step 2: Package two .ipa files 0:48 Step 3: Upload to TestMu AI and run 1:12 4/4 tests pass on a real iPhone #XCUITest #iOSTesting #RealDeviceTesting #TestMuAI

Join the discussion

Have something to add?

Sign in to reply, follow this thread, and earn XP when your answer helps someone.