Xcode 10 fails to run XCTest/XCUITest on device

Viewed 794

After upgrading to XCode 10, it fails to run my tests on the device. After finish building, it immediately shows a popup "Test Failed" without showing any errors on the console.

"Run" works on device. Both XCTest and XCUITest runs on simulator.

The error is reproducible on new project running the default UITest on the device.

2 Answers

Restarting the phone made it work.

Check Targets [Build Settings] Search IPHONEOS_DEPLOYMENT_TARGET

Remove IPHONEOS_DEPLOYMENT_TARGET setting

Before:

Before

After:

After

Related