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

两盒软妹~` 提交于 2019-11-29 07:40:08
Sohil R. Memon

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

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.

Edited:

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

"$(TARGET_TEMP_DIR)/../$(PROJECT_NAME).build/DerivedSources"

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!