iOS – ‘MyProject-Swift.h’ file not found when running Unit Tests for Swift

“MyProject-Swift.h” file is generated at following path:

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

I end up adding this to Header Search Paths for my Unit Test target.

Also as @hyouuu pointed out about being the known issue, hopefully Apple will provide some good solution at their end. Until I believe we need to use this above solution.

https://developer.apple.com/library/content/documentation/Xcode/Conceptual/RN-Xcode-Archive/Chapters/xc6_release_notes.html

Leave a Comment