“XXX-Swift.h” file not found in test project

Sohil R. Memon

Go to Xcode Project > Build Settings and type "header name", you will get the below option:

enter image description here

Make sure that there must exist a file with a name: $(SWIFT_MODULE_NAME)-Swift.h

Then type, "bridging header" under Build Settings and make sure that the path of "bridging-header.h" file exist correctly.

enter image description here


1) Make sure that your "Project Name" doesn't contains spaces 2) Well "XXX-Swift.h" file is generated at the following path, so you need to add that path to unit test - Go to build settings, type "Header Search Paths" and add the following line


For more, you can refer this link : iOS - 'MyProject-Swift.h' file not found when running Unit Tests for Swift