Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 972
Raphael Avatar asked Mar 14 '23 08:03

Raphael


1 Answers

I got the same problem, and it was because the Host Application wasn't set. I don't know why it got reset, but it makes sense since the swift file were not in the test target.

like image 196
CiNN Avatar answered Mar 29 '23 20:03

CiNN