1

I have this issue on the latest Xcode 8.0 where when I attempt to #import "xxx-Swift.h" in my Objective C implementation I get an error in my code editor of "file not found".
The project builds and debugs fine, but I cannot seem to get rid of this annoying red bullet.
I have been through all the build settings, and triggered and played with every single one of them.
Yes, these settings definately seem fine.
As I say, the project build succeed.
But the error in the code window is really annoying.
Eventually I fixed it with an

ln -s /Users/xxx/library/Developer/Xcode/DerivedData/yyy/Build/Intermediates/zzz.build/Debug-iphonesimulator/zzza.build/DerivedSources/zzz-Swift.h /projectSourceFolder/zzz

Anybody have a better suggestion on how I can fix this or what I am doing wrong?
Perhaps, an Xcode bug?
Feedback / suggestions would be much appreciated.

Thanks in advance.

boraseoksoon
  • 2,164
  • 1
  • 20
  • 25
Christo Smal
  • 615
  • 5
  • 16

1 Answers1

0

Go to File -> New -> File... select Swift File, name the file as Objective-C-BridgingHeader.swift (any name you want) and click create. Then it will presented with another dialog that says "Would you like to configure an Objective-C bridging header?" Click Yes will automatically create the "yourprojectname-Swift.h" file for you.

enter image description here

This is the one of the simple way to create the bridging header.

Jeyamahesan
  • 1,101
  • 7
  • 15