Skip to content

Enable Swift types exposed in Objective-C APIs to be visible to the Swift consumer #956

@abdulowork

Description

@abdulowork

Hey folks. This is a bit more specific feature request for a set of issues:

When building SwiftPM targets in Xcode, it is challenging to enable the Swift consumer to see Swift types from transitive Swift modules when they are exposed through an Objective-C API, which makes the API itself uncallable.

My specific use case: we in Kotlin are building a SwiftPM interop for our native backend. When we emit a header file with types that we imported from SwiftPM, such APIs become uncallable in the final application.

I've built the reproduction for this issue here, and it's identical to the one described in the forum thread above.

Would it be possible to pass the -Xcc -fmodule-map-file to the consuming Swift compilations from transitive SwiftPM Swift targets to enable this use case?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions