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

Add support for Swift Package Manager #600

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

fredericgermain
Copy link

@fredericgermain fredericgermain commented Nov 14, 2022

[email protected]:fredericgermain/Masonry.git can be added to a project using branch pr/swiftpm

It would be nice to have swiftpm added in a new version

Inspired by https://stackoverflow.com/a/67376388/1532175, I'm not a Package.swift pro

Frederic GERMAIN added 2 commits November 14, 2022 20:58
Test not ported, but package can be integrated
by an external application with this.
@Wei18
Copy link

Wei18 commented Dec 20, 2022

Could you only add folder include and Package.swift?

Thanks

@fredericgermain
Copy link
Author

Do you mean removing the commit that removed the Pods file? Why would you want to keep them?

For me, they shouldn't be in the source base as you can get them with a simple pod install. They are even more useless if you use swiftpm, they would pollute the project view in XCode I think.

@Wei18
Copy link

Wei18 commented Dec 21, 2022

I'm doing the same for needed-maintenance to Pod -> Package too.

Why would you want to keep them?

I think you need support both Cocoapods and SwiftPackage until the author decide to nonsupport Cocoapods.

Thing like this,
AssistoLab/KVNProgress#126
m1entus/INSPullToRefresh#93

@fredericgermain
Copy link
Author

Oh. I don't remove CocoaPods support with my commits: Masonry.spec, Podfile, Podfile.lock are still there.

I remove all files that are added by the pod install command itself. These files are completely unnecessary when you use Masonry as a CocaoPods dependency, and they pollute swiftpm projects.

They should never have been in the git repository in the first place. In the projects you've just linked, there are ...spec, Podfile and Podfile.lock, but without the Pods/ directory.

So for me, everything is fine, unless someone actually has a use case for not removing these files.

@Wei18
Copy link

Wei18 commented Dec 22, 2022

Thanks for explanation.

For someone wanna quick use this solution. (I have tried successful at least).

And added following if needed.
// Apple Clang - Preprocessing (1)
// [Note] MAS_SHORTHAND: define this constant if you want to use Masonry without the 'mas_' prefix
// [Note] MAS_SHORTHAND_GLOBALS: define this constant if you want to enable auto-boxing for default syntax
GCC_PREPROCESSOR_DEFINITIONS = MAS_SHORTHAND MAS_SHORTHAND_GLOBALS $(inherited)

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

Successfully merging this pull request may close these issues.

None yet

2 participants