[swift-users] Discrepancy between sharing internal Swift symbols with Obj-C when in an app vs a framework target
Kevin Lundberg
kevin at klundberg.com
Sat Jun 4 13:29:41 CDT 2016
The former case is what I'm concerned with. I agree that code external to the framework should only see public symbols. However objc code inside the same framework as the swift code in question should ideally be able to see internal swift symbols as well, as they are within the same module.
--
Kevin Lundberg
On Jun 4, 2016, at 2:48 AM, Brent Royal-Gordon <brent at architechies.com> wrote:
>> I ran into a major hurdle this week that basically stopped my work in
>> its tracks. I've been working on moving a large codebase from an iOS app
>> target to a framework target, since we have the same code in multiple
>> app targets and it is problematic to have to remember to add new code to
>> every single app target when they can all just share a framework.
>
> To be clear: Are you having trouble making the Objective-C and Swift inside your framework talk to each other, or the Objective-C outside your framework talk to the Swift inside your framework?
>
> If it's the latter, then I agree with Jens that this is "works as intended", and you're just going to have to spend some time pasting `public` into your code in a lot of places. But if you're being forced to make Swift APIs public so you can use them from Objective-C *inside* the framework, that might be something worth talking about.
>
> --
> Brent Royal-Gordon
> Architechies
>
More information about the swift-users
mailing list