Swift Package dependency on XCframework and Bridging Header file

I have created a XCframework from an available .a library with ObjC code. I am able to include the XCframework as framework dependency to another SwiftUI project and use the functionality offered by the framework. Given the nature of the framework I need to add a Bridging Header file to my SwiftUI project.

However I want to create a Swift Package with a dependency on that framework, the Swift Package should encapsulate some SwiftUI functionality. Any other app should be able to add a Swift Package dependency and use the SwiftUI functionality e.g. use a View as offered by the Swift Package.

Now I followed the instructions for adding XCframeworks to a Swift Package, but somehow I cannot get the configuration correctly and the classes and methods defined in the framework can not be found (header files not found)

Can someone tell me if it’s possible what I want and if so, how to set it up?

This topic was automatically closed after 166 days. New replies are no longer allowed.