Open Xiangao2018 opened 3 years ago
I'm sorry that I've not managed to fix this issue.
According to the following article, it's complicated for a mixed-language project to support SPM. https://joesusnick.medium.com/swift-package-manager-with-a-mixed-swift-and-objective-c-project-part-2-2-e71dad234e6
I've fixed the Package.swift in this branch. https://github.com/lexrus/MMDB-Swift/tree/fix_spm But the MMDB.swift could not find the necessary headers in the embed SPM dependency even if I specified the headers.
Thus, I'll remove the SPM installation description in the README sooner or later.
I have encountered the same problem a few years ago, and managed to build a package via SPM somehow.
My approach was similar to your branch called spm (not fix_spm
), I don't know what spm
branch was created for though.
At least my approach seems to work even now. I have created a branch from the latest master, and was able to build a package successfully. https://github.com/5t111111/MMDB-Swift/tree/fix-spm-2
Since unfortunately I am not a full time Swift developer and uses Swift only on kind of server-side CLI, I cannot send a pull request about SPM support. I just hope it helps you.
相对路径咋写
Showing All Messages Source files for target MMDB should be located under 'Sources/MMDB', or a custom sources path can be set with the 'path' property in Package.swift