I'm getting stuck retrofitting a framework I created that supports Carthage to also support Swift Package Manager. The problem is with a single helper method for catching NSExceptions that is written in Objective-C. All of the other files in the framework are written in Swift.
I have pulled the source files that provide that method and tried 1) adding the ObjC files as a separate target defined in the package (and a separate folder for its two source files), and 2) creating a completely separate package that the main package uses as a dependency.
In either case, once I get the package to build successfully in Xcode, I get error messages stating that the module does not exist, and Control-clicking on an import statement for the Objective-C dependency takes me to a blank screen. This leads me to believe that I have probably set up the Objective-C package incorrectly, but I have been having a very difficult time finding any documentation for how it should be set up.
I wonder if anybody in this forum can help me find some documentation, point me to a simple example of a mixed language SPM distribution, or otherwise suggest how to fix this problem.
You haven't exposed any public functionality for the Objective C module, so I'm guessing the compiler isn't synthesising a module map. C-language targets need to have an include directory which exposes the public headers files, or you need to provide your own module map. You can read about that at the SwiftPM docs. Once you add that, that should fix the compilation errors