Skip to content

Comments

Add precompiled xcframework binary option for SPM#228

Closed
woohyunjin06 wants to merge 2 commits intolayoutBox:masterfrom
woohyunjin06:master
Closed

Add precompiled xcframework binary option for SPM#228
woohyunjin06 wants to merge 2 commits intolayoutBox:masterfrom
woohyunjin06:master

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