Swift 2.0: To use Objective-C code from Swift within the same framework, headers must be made public
| Originator: | apsharp | ||
| Number: | rdar://23210025 | Date Originated: | 22-Oct-2015 09:40 AM |
| Status: | Open | Resolved: | |
| Product: | Developer Tools | Product Version: | Xcode 7.0 |
| Classification: | Other Bug | Reproducible: | Always |
Summary: Because bridging headers are not supported for framework targets, the only way to expose Objective-C headers to Swift is to make the headers public. This is a regression when compared to a pure Objective-C project, where you can choose to keep Objective-C headers internal. Steps to Reproduce: 1. Create a new Swift framework target 2. Create an Objective-C class 3. Attempt to use this class from Swift: the only way to do so is to expose it in the umbrella header, and attempting to add a bridging header results in a compiler error. Expected Results: N/A Actual Results: N/A Regression: There is no such limitation in a pure Objective-C framework. Notes: N/A
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!
swiftc error when trying to use SWIFT_OBJC_BRIDGING_HEADER