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 Maui support #379

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from
Draft

Add Maui support #379

wants to merge 2 commits into from

Conversation

Csaba8472
Copy link

✨ What kind of change does this PR introduce? (Bug fix, feature, docs update...)

This PR adds MAUI and .net6 compatibility.

⤵️ What is the current behavior?

Currently LottieXamarin doesn't support .net6 projects.

🆕 What is the new behavior (if this is a feature change)?

LottieMaui supports MAUI projects, and I've created two new projects for iOS and Android.

💥 Does this PR introduce a breaking change?

No, as the current projects weren't changed.

🐛 Recommendations for testing

This PR only adds iOS and Android compatibility, macOS, Windows and tizen is not ready yet.

Also, ViewRenderer hasn't been refactored to ViewHandler, so this needed to init the lib:

			.UseMauiCompatibility()
#if ANDROID
				.ConfigureMauiHandlers(handlers =>
				{
				 handlers.AddCompatibilityRenderer(typeof(AnimationView),
                        typeof(AnimationViewRenderer));
				})
#elif IOS
				.ConfigureMauiHandlers(handlers =>
                {
                    handlers.AddCompatibilityRenderer(typeof(AnimationView),
                        typeof(AnimationViewRenderer));
                
                })
#endif

📝 Links to relevant issues/docs

🤔 Checklist before submitting

  • All projects build
  • Follows style guide lines
  • Relevant documentation was updated
  • Rebased onto current develop

@F-Goncalves
Copy link

F-Goncalves commented May 24, 2022

Hi @Csaba8472
how is the progress for this. Is there anything I could help with?
I forked you branch, but cannot get it to build properly. Cannot find UseMauiCompatibility() and the rest of your code snippet.

@Csaba8472
Copy link
Author

hello @F-Goncalves
I think this can be closed because:
1, for some reason at some point the android binding broke, I couldn't make it work again. (maybe something changed in a newer lottie lib)
2, the ios binding is based on an older objc version of lottie lib, so even if we do the binding, we will end up with the old ios lottie lib

I think to make the android side work might be easier, but to be able to update the ios lottie lib to the newest swift lib takes more work. In my project I've chosen to create a slim binding. API is not complete, but it works, and it uses the latest lottie libs. https://github.com/Csaba8472/LottieMaui

@F-Goncalves
Copy link

F-Goncalves commented May 24, 2022

That's unfortunate.
I'll definitely check out your repository. Thanks for trying though.

@rsbepvb
Copy link

rsbepvb commented Jun 12, 2022

Any update on Maui support?

@juanjbarrionuevooa
Copy link

Does anyone know if this will be alive again to make this NuGet work on MAUI?

@martijn00
Copy link
Member

I've done some manual work to get things building. Android works, iOS doesn't so far. Anyone wants to update this PR or put in a new one to fix that?

@AdamDiament
Copy link

I'm keen to help @martijn00 as I want to upgrade my Xamarin binding of the zoom meeting SDK to support MAUI, and zoom requires lottie. https://github.com/VisualService/dotnet-zoom-meeting-SDK

In the meantime, is it possible to get access to a nuget for the working android side at all, so I can test it out? Or should I clone and build a dll from this branch and reference that?

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

6 participants