Getting "file not found" in Bridging Header when importing Objective-C frameworks into Swift project

Found a solution:

  • The "Objective-C Bridging Header" setting (aka SWIFT_OBJC_BRIDGING_HEADER) must be set at the Target level, and NOT the Project level. Be sure to delete the setting value at the Project level.

(to me, it seems like an Xcode bug, since I don't know why it fixes it).


I have the same issue. I changed all my imports from #import "HMSegmentedControl.h" to #import <HMSegmentedControl/HMSegmentedControl.h> for example.


I had to add my lib directory in User Header Search Paths:

test target settings - user header search path

In my case the lib directory contains the .a-library file and some header files. These are included in the bridging header file. However, the swift compiler wouldn't find them. Only when I added ${PROJECT_DIR}/lib to the User Header Search Path it built the test target.

(I am using Xcode 6.2 on Mavericks 10.9.5)