Unable to forward declare Swift types from SPM package using ImportObjcForwardDeclarations #78610
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
triage needed
This issue needs more specific labels
Description
I have a local swift package that I'm importing into my main app target. In the app target, I'm forward declaring a protocol from the package in order to create a property in an objective c header file. I can import the module in the .m file just fine and use the type as I'd expect. However, I have a swift file that extends this class that isn't able to access this property.
My understanding is ImportObjcForwardDeclarations is supposed to address this problem. I've tried passing the feature flag for Swift 5, or just using Swift 6 where I believe the feature is on by default.
I've reproduced in the sample project attached below.
Reproduction
ObjcForwardTest.zip
Expected behavior
In my sample project, I expect to be able to access all of the properties in the view controller's header file in the swift extension of that view controller.
Environment
Sample project is using Swift 6, I'm seeing the same issue with Swift 5 + feature flag.
Additional information
No response
The text was updated successfully, but these errors were encountered: