Search code examples
iosobjective-cxcodeswiftxctest

Error running XCTest for Swift/Obj-c project (Error 83)


I'm having the following error when trying to run the tests for my Swift/Obj-c app:

    2016-02-07 00:02:26.752 xctest[3275:115122] The bundle “MyAppTests” couldn’t be loaded. Try reinstalling the bundle.
2016-02-07 00:02:26.752 xctest[3275:115122] (dlopen(/Users/raphaelcruzeiro/Library/Developer/Xcode/DerivedData/MyApp-bjdolynlskqvavgryvznzbluqele/Build/Products/Debug-iphonesimulator/MyAppTests.xctest/MyAppTests, 265): Symbol not found: _CLSDevelopmentPlatformNameKey
  Referenced from: /Users/raphaelcruzeiro/Library/Developer/Xcode/DerivedData/MyApp-bjdolynlskqvavgryvznzbluqele/Build/Products/Debug-iphonesimulator/MyAppTests.xctest/MyAppTests
  Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Agents/xctest
 in /Users/raphaelcruzeiro/Library/Developer/Xcode/DerivedData/MyApp-bjdolynlskqvavgryvznzbluqele/Build/Products/Debug-iphonesimulator/MyAppTests.xctest/MyAppTests)
Program ended with exit code: 83

It's a fairly big app and it does not use Frameworks as I need to support iOS 7 if that makes any difference. The app had no tests. I have just created the first test suite now.


Solution

  • After hitting my head a few times over this, I decided to delete the test target and recreate it from scratch. that solved my problem.