Swift to Objective-C bridging is unreliable

Originator:imarcelv
Number:rdar://21362856 Date Originated:6/12/15
Status:Open Resolved:No
Product:Developer Tools Product Version:Xcode 7.0b1
Classification:Other bug Reproducible:Sometimes
 
Summary:
From time to time Xcode can't find the ModuleName-Swift.h file, which allows bridging from Swift to Objective-C. This is pretty serious and should be fixed asap. 

When Xcode doesn't find the header it just says "Header file not found" or even throws a linking error. The entire bridging process should be improved simply because there is still a lot of potential.

I asked a Swift engineer at WWDC in a lab and even he didn't know how to fix this issue.

Steps to Reproduce:
1. Add a ramdom Swift class to an Objective-C project
2. Add the #import "ModuleName-Swift.h" file that Xcode generates automatically
3. Try to use it or just try to compile the project
4. From time to time it simply doesn't work

Expected Results:
Bridging should be reliable and easy to encourage users to use swift and Objective-C.

Actual Results:
Bridging is painful and makes me want to stick with Objective-C.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!