Better support for Swift targets that depend on pre-compiled static Objective-C libraries #1608
Labels
bounty
Resolving this issue is rewarded with a bounty: https://github.com/tuist/tuist/discussions/4982
type:enhancement
New feature or request
Context 🕵️♀️
@laxmorek brought up an interesting use-case where a Swift target depends on a pre-compiled static Objective-C library that has no Swift module map. He tried to consume the library from the Swift code in the target but he was not able to access the public interface of the library.
What 🌱
As Apple suggests here, the target needs to be marked as a module (if it's a framework) and have a umbrella header where the public headers of the library are imported.
Proposal 🎉
Although we could document this use-case, I think Tuist could handle the scenario more gracefully for the sake of user's convenience. Like we do in other areas of the project, we could auto-generate the umbrella-header and set the right build setting to the target. The only drawback that I see with this approach is that the auto-generated umbrella-header might conflict with any other existing umbrella-header. We'd need to figure out a way to handle this scenario too.
The text was updated successfully, but these errors were encountered: