After updating to Xcode 10 some of the projects (ObjC + Swift) I'm working on started failing with this error:
failed to emit precompiled header '*.pch' for bridging header
After researching the issue for quite some time... I found a solution and some information why it's happening.
The reason why it's happening is because of the new building system or something related to the building process. If you're importing your Swift classes in your Objective-C classes, you normally include the
#import "PROJECT-Swift.h" at the top of the ObjC's class.
Now, if you want to do the same, you have to specify each Swift class you want to use by
@class SWIFT_CLASS. This way, you can access and use them.
I hope that this short article would help you if you're experiencing this problem with your project. 👻
Happy debugging, fellow devs! 👨💻