7

In OS X 10.9.5 i upgraded from Xcode 5.1.1 to Xcode 6.0.1 (via the App Store). Now in my project XCTest.framework and MyAppTests.xctest are displayed in red letters:

XCTest.framework in red

Still the tests seem to run without problem. What does the red color mean, how can i fix the problem?

Note: I did see this question, but as it is not related to an Xcode upgrade it describes only a similar symptom but it may have a different cause and solution.

1 Answer 1

9

Red letters mean Xcode cannot find the corresponding file in the filesystem.

Why is XCTest.framework displayed in red?

The framework does not reside in the same location in Xcode 6.0.1 as it used to in Xcode 5.1.1
It has moved from:

/Applications/Xcode.app/Contents/Developer/Library/Frameworks/XCTest.framework 

to:

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks/XCTest.framework

Why is the MyAppTests.xctest product displayed in red?

I created a separate Test Configuration in Xcode in order to avoid sandboxing problems as described here: http://marcschwieterman.com/blog/testing-in-the-sandbox/ . As a result, tests get built in their own location and no longer in the debug location as before. But the location of the MYAppTests.xctest product is not automatically updated by Xcode, nor could i find a way to update it manually to the new location.

4
  • To update it manually to new location, simply click on XCTest.framework -> show utilities panel -> click on file inspector -> click on folder icon on the right side of location section -> choose the new location.
    – David Liu
    Commented Jan 16, 2016 at 4:36
  • 1
    This is correct for XCTest.framework, but it does not work with MYAppTests.xctest. In this case the folder icon is grayed out and it is not possible to change it's location.
    – MartinW
    Commented Jan 17, 2016 at 10:45
  • I think for the product, you can try to build on physical device, if should remove this issue.
    – David Liu
    Commented Jan 18, 2016 at 16:15
  • @DavidLiu I tried that on XCode 7 and it still remains red. Like the OP said, everything works, just stays red though
    – stonedauwg
    Commented Jun 24, 2016 at 15:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.