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 precompiled xcframework binary option for SPM #228

Closed
wants to merge 2 commits into from

Conversation

woohyunjin06
Copy link

@woohyunjin06 woohyunjin06 commented Jul 24, 2023

Background

  • When using FlexLayout with SPM, developers need to manually add FLEXLAYOUT_SWIFT_PACKAGE=1 to the GCC_PREPROCESSOR_DEFINITIONS for each target.
    This can cause inconvenience when creating and distributing other Swift Packages that depend on FlexLayout.
  • This may cause unexpected issues when building with some third-party build systems.
    (In my case, issues occurred during a build with Tuist.)

In order to simplify this setup process, I proposed to offer a precompiled binary.

Changes

  • Added a precompiled xcframework binary for FlexLayout that can be utilized through the binaryTarget property of Swift Package.
  • Removed one of the redundantly declared postfix operator % statements to apply BUILD_LIBRARIES_FOR_DISTRIBUTION(Already declared in Percent.swift)
  • Added a shell script that creates an XCFramework.

Related

@lucdion
Copy link
Member

lucdion commented Dec 13, 2023

@OhKanghoon has opened this PR removing the need to define FLEXLAYOUT_SWIFT_PACKAGE.
Do you still think that your change is useful?

@woohyunjin06
Copy link
Author

@lucdion Hi, I saw his PR too, and I think that can give users a better experience, so I don't think this PR is necessary if that PR is merged

@lucdion
Copy link
Member

lucdion commented Dec 13, 2023

Thanks

@lucdion lucdion closed this Dec 13, 2023
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.

3 participants