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 source for EpoxyCore library to support open-source SwiftUI view implementation #2086

Merged
merged 11 commits into from
Jun 28, 2023

Conversation

calda
Copy link
Member

@calda calda commented Jun 23, 2023

This PR adds the source of EpoxyCore 0.9.0 to this repo.

Airbnb has a Lottie SwiftUI.View implementation which is built using APIs in EpoxyCore. Making that dependency available in this library would let us open source this existing implementation.

Embedding the source of EpoxyCore into this repo feels reasonable and has existing precedent (we already integrate the ZipFoundation library in this way). EpoxyCore is only 3000 LOC, so does not meaningfully increase the size of this repo or the size of compiled binaries.

The only downside of this approach I can think of is that EpoxyCore doesn't currently support macOS. If the Lottie SwiftUI implementation uses EpoxyCore it will only be available on iOS and tvOS. I think this is probably an acceptable tradeoff, given the benefits of using the existing high-quality implementation. Thoughts?

@calda calda marked this pull request as ready for review June 26, 2023 22:27
@calda
Copy link
Member Author

calda commented Jun 26, 2023

This PR is ready for review @airbnb/lottie-ios-maintainers

@calda calda force-pushed the cal--epoxy-core branch 2 times, most recently from 82e7246 to 11d5021 Compare June 26, 2023 22:28
- uses: ./.github/actions/setup
- name: Lint Embedded Libraries
run: bundle exec rake lint:EmbeddedLibraries
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a new CI job that lints the Sources/Private/EmbeddedLibraries directory and verifies that it doesn't have any public symbols. Confirmed that it fails as expected if there's an unexpected public symbol:

Screenshot 2023-06-26 at 3 25 02 PM

@@ -0,0 +1,39 @@
## EpoxyCore
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added some discussion about why we include the source of EpoxyCore, plus instructions on how to update this in the future if necessary

Copy link
Contributor

@thedrick thedrick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM @calda - the point about macOS does seem pretty important, especially given that SwiftUI's main conceit is that it can work across all platforms. I wonder how much work it would be to add support for macOS in the future

@calda calda merged commit c4dc4d7 into master Jun 28, 2023
12 checks passed
@calda calda deleted the cal--epoxy-core branch June 28, 2023 15:48
iago849 pushed a commit to atteamapps/lottie-ios that referenced this pull request Feb 8, 2024
MoroziOS pushed a commit to MoroziOS/tmg-lottie-ios that referenced this pull request May 22, 2024
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.

2 participants