Skip to content
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

Swift Package support #44

Open
adamwulf opened this issue Oct 26, 2021 · 4 comments
Open

Swift Package support #44

adamwulf opened this issue Oct 26, 2021 · 4 comments

Comments

@adamwulf
Copy link

Thanks for SVGgh! We're migrating away from cocoapods and would love to be able to integrate this library with SPM. Any plans for adding a Package.swift sometime soon?

@grhowes
Copy link
Contributor

grhowes commented Oct 26, 2021

I’ve been thinking about it. Doesn’t seem like it would be difficult.

@ryanholden8
Copy link
Contributor

I ended up doing this for a project in this commit: ryanholden8@4d27b75

@grhowes
Copy link
Contributor

grhowes commented Oct 28, 2021

I ended up doing this for a project in this commit: ryanholden8@4d27b75

What is the reason for wrapping so much in

``#if __has_include(<UIKit/UIKit.h>)

I’ve spent the last day trying to get it packaged without too much disruption to the CocoaPod. Also trying to figure out how to make sure it bridges to Swiift automagically if possible.

@ryanholden8
Copy link
Contributor

@grhowes - Good question, and I wish I could remember the exact reason. This was for a swift project built out into modules via Swift packages where those packages had SVGgh as a dependency and it was built against iOS and Mac Catalyst. It may have been to work around an issue with SPM build process at the time or just me not targeting something correctly.

Maybe this: https://stackoverflow.com/a/34779231/2191796
or maybe the first issue here: https://stackoverflow.com/a/66238069/2191796

I have not revisited it recently but saw this post and wanted to show it's possible but it's not at the quality worthy of a PR so feel free to take the changes with a grain of salt ;)

Appreciate your work on this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants