12

Project can build properly on iphone 4s simulator but trying to run UITest on it gives me the error :

The bundle “MyappUITests” couldn’t be loaded because it doesn’t contain a version for the current architecture. Try installing a universal version of the bundle.

Can't seem to figure out the root cause for this, tests are running properly on every other simulator.

Any thoughts?

thibaut noah
  • 1,474
  • 2
  • 11
  • 39

3 Answers3

16

I have solved this problem setting "iOS Deployment Target" of the UITest target to iOS 9.0. It was created with 11.1 value by Xcode.

UITest target Build Settings

widemos
  • 316
  • 2
  • 4
7

I experienced this error while trying to get a new M1 Macbook Pro to run XCUITests.

I had set Excluded Architectures (in the Build Settings) for Simulator SDK to be arm64 for both the main target and the XCUITests target. Removing this exclusion from the XCUITests target fixed this error.

Hope this helps some others who are having a nightmare like me with the new M1 Macbooks... wish I'd never upgraded.

Charlie S
  • 4,366
  • 6
  • 59
  • 97
0

Following up on the above answer by Charlie Seligman, I also had an issue running XCUITests. Was able to solve it by setting all options under "Build Active Architecture only" to "no", in XCode build settings. Details: https://github.com/appium/java-client/issues/1444#issuecomment-781078298

Sagol Goru
  • 43
  • 1
  • 4