New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added SwiftPM support #119
Added SwiftPM support #119
Conversation
What is the rationale for moving all the files into a different folder? And why is the module map file needed? |
The ObjC framework needs the required |
Also it seems the source code was not even compiling before, because the parent folder |
Headers moved to `include` folder with module map for SwiftPM support
A module is defined though without these changes. I'll look into Catalyst support when I get time. |
SwiftPM forces a specific directory layout to compile ObjC source. The module you specify is defined when building from the dynamic framework (e.g. Carthage). You need the module file for SwiftPM since SwiftPM has no knowledge of the Xcode project and build settings. |
I just tested this with catalyst (by enabling catalyst support in the example project) and it works fine. SwiftPM seems to work too, at least with Accio. Unless I'm missing something I am going to close this. So please double check on your end and if anything isn't working let me know. |
Accio is third party, currently this does not build properly by just adding the Git URL to the project in Xcode 11, with the official iOS SwiftPM support. |
Please merge this. Official SPM integration doesn't work as is.
Gets you an error: "Cannot call value of non-function type 'module'" To reproduce:
|
Ok I just tested this and while Accio works, SwiftPM in Xcode 11 doesn't. Your changes seem fine, except it would break CocoaPods support currently (the s.source_files glob needs to be updated to be recursive) and one deal breaker is the fact that you can't bundle resources with SwiftPM, which essentially makes the success and error indicators unusable. Only real way to fix is to generate the images at runtime/use a CAShapeLayer. |
I made all the changes I mentioned in my last comment. Will release a new version now. Thanks for the contribution! |
Fixes SwiftPM and Mac Catalyst support (#118)