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

Rename public types that conflict with SwiftUI types #1761

Merged
merged 5 commits into from
Oct 10, 2022

Conversation

calda
Copy link
Member

@calda calda commented Oct 7, 2022

This PR renames Animation and Color to LottieAnimation and LottieColor, to resolve conflicts with the SwiftUI Animation and Color types. For consistency this PR also renames AnimationView to LottieAnimationView.

Fixes #1420.

We'll release Lottie 3.5 next week, with this being the only change from 3.4.4. This version includes typealiases for the old names, so there is no source breakage. Xcode emits a warning with a fix-it to update callsites to the new name.

In a few weeks we plan on releasing Lottie 4.0. We will remove the old typealiases, which will resolve the naming conflict with SwiftUI.

@calda calda force-pushed the cal--rename-public-types branch from 08e0b8b to d7805c9 Compare October 7, 2022 21:34
Copy link
Collaborator

@erichoracek erichoracek left a comment

Choose a reason for hiding this comment

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

LGTM! Just a few questions

Sources/Public/Animation/LottieAnimation.swift Outdated Show resolved Hide resolved
Sources/Private/Model/Text/TextAnimator.swift Outdated Show resolved Hide resolved
@IBDesignable
final public class AnimationView: AnimationViewBase {
final public class LottieAnimationView: LottieAnimationViewBase {
Copy link
Collaborator

@erichoracek erichoracek Oct 7, 2022

Choose a reason for hiding this comment

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

Have you put any thought into what we'd name a SwiftUI View for Lottie animations? If both LottieAnimation and LottieAnimationView are taken I wonder what options we would have

Copy link
Member Author

Choose a reason for hiding this comment

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

Good question, LottieView is a potential option. How have we been handling this in other cases, where we provide a UIView and SwiftUI View with the same functionality?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Sure, I think LottieView would work!

@calda calda merged commit b4bd060 into master Oct 10, 2022
@calda calda deleted the cal--rename-public-types branch October 10, 2022 23:45
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.

Redundant conformance of 'Color'
2 participants