If you use CocoaPods as package manager, must set search path etc. Give a simple way,
Try adding this in your Podfile:
target 'YourProductTests' do
inherit! :search_paths
# Pods for testing
end
and pod install
It works for me.
If the above solution does not work for you, try setting manually:
-
Click your Test target -> Build Setting-> tab: All & Combined -> Swift Compiler -Code Generation -> Objective-C Bridging Header : add your xxx-bridging-header
-
Check “Search Path”, set up value of
Framework Search Path,Header Search Paths,Library Search Pathaccording to your main target. Maybe some search path lose here, manually add again.