3

Every time I try to debug my unit tests target I get the following error:

warning: Swift error in fallback scratch context: <module-includes>:1:9: note: in file included from <module-includes>:1:
#import "Headers/XCTest.h"
        ^

error: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCTest.h:32:9: error: 'XCTest/XCTestDefines.h' file not found
#import <XCTest/XCTestDefines.h>
        ^

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCTest.h:32:9: note: did not find header 'XCTestDefines.h' in framework 'XCTest' (loaded from '/Users/user/Library/Developer/Xcode/DerivedData/APPNAME-ebossfqajqztscckouvectldklmw/Build/Products/Debug-iphonesimulator/APPNAME.app/Frameworks')
#import <XCTest/XCTestDefines.h>
        ^

error: could not build Objective-C module 'XCTest'


note: This error message is displayed only once. If the error displayed above is due to conflicting search paths to Clang modules in different images of the debugged executable, this can slow down debugging of Swift code significantly, since a fresh Swift context has to be created every time a conflict is encountered.

I am running latest Xcode release (11.4.1 11E503a) and the project is using latest CocoaPods (1.9.1) as a package manager.

I tried looking at the target build settings but I couldn't find anything suspicious, tried changing a lot of the settings and rebuilding, nothing really helps.

Any help would be appreciated!

Adi B.
  • 369
  • 1
  • 3
  • 10

0 Answers0