As apple has released Xcode 9 beta version with Swift 4.0 support. I have been trying to upgrade my code to Swift 4.0 from Swift 3.2. But it keeps giving me failed to import bridging header
error whereas my project build successfully.
Xcode error detail:
Convert to Current Swift Syntax Failed
Please ensure that all selected targets build successfully with the currently configured Swift version before attempting a migration.
Has anybody faced the similar error while upgrading code base to swift 4.
I had the similar problem in one of my projects and how I solved this is next:
I figured out that CocoaPods are the problem.
I removed CocoaPods from my project (if you don't know how to do that check this How to remove CocoaPods from a project?)
Don't forget If you have unit & ui tests you have to repeat 4th step from the link above on them as well.
Upgrade your code base to Swift 4
Install pods again and you are done.
Hope it helps :)