5

When I tried creating a unit test file in xcode 5.0, I get the following error:

The test bundle at /.../Tests.octest could not be loaded because it is built for a different architecture than the currently-running test rig (which is running as x86_64).

What should I do?

2 Answers 2

4

You are probably trying to run the tests in the "iPhone Retina (4-inch 64-bit)" Simulator.

Switch to the "iPhone Retina (4-inch)" Simulator, and things should work fine

Sign up to request clarification or add additional context in comments.

2 Comments

Downvoted this answer because tests should be able to run regardless of the simulator they are running in. If they don't work in the 64-bit simulator, then the developer needs to figure out how to do so.
I upvoted because the answer marked as correct did not work for me. This one did.
0

You can try to close Xcode and delete

~/Library/Developer/Xcode/DerivedData/ModuleCache

I had a similar issue using the XCTest framework. In the end I delete all tests and added them back by creating a new test target.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.