I have a SwiftPM package that contains most of my app code as a library (and it's added to the app's Xcode project). The package includes both Swift and C++ files with C++ interoperability enabled. I'm successfully able to access and use C++ APIs from Swift. However, I have yet to access Swift APIs in C++ code. I had assumed SwiftPM would auto-generate a bridging header for C++, but I tried MyLibrary-Swift.h
and MyLibrary/MyLibrary-Swift.h
, and neither works.
Update: After re-reading the Setting Up Mixed-Language Swift and C++ Projects document, I saw that SwiftPM doesn't support using Swift APIs in C++.
Is there any workaround for this?