fluttie icon indicating copy to clipboard operation
fluttie copied to clipboard

iOS support?

Open kentcb opened this issue 6 years ago • 19 comments

Hi,

This is more a query than an issue. I noticed that the README specifically states that iOS isn't yet supported, but it doesn't make it clear whether iOS support is planned/will be added.

Can you elaborate please?

Thanks

kentcb avatar May 23 '18 23:05 kentcb

Thanks for your interest. The plugin doesn't support iOS because I don't have any experience with iOS development and I don't have access to a Mac which would be required to add support for it. Thus, iOS support is unlikely to be implemented soon, sorry.

simolus3 avatar May 24 '18 10:05 simolus3

I will take a look to the code and i will try to implement the iOS part

jlouage avatar May 24 '18 11:05 jlouage

Great, thank you for considering to do this, I really appreciate it :thumbsup: If you need any clarifications on the internal methods / platform channels, please let me know where I can improve the documentation.

simolus3 avatar May 24 '18 14:05 simolus3

I will also be looking into this as well. Really need it :)

nadenf avatar Jun 08 '18 00:06 nadenf

Making excellent progress on this. The animations are appearing on the iPhone.

So expect a pull request in the next couple of days 👍

nadenf avatar Jun 08 '18 07:06 nadenf

Thought I would give a status update since it's been an interesting adventure.

So I am new to Flutter and wasn't aware that there was no way to really mix/match iOS UIView with Flutter Texture. It was at one point on their list but due to the complexity has been largely dropped: https://github.com/flutter/flutter/issues/14927

This makes the iOS implementation a giant "hack" since what I am doing is taking the animation UIView, converting to a UIImage and finally to a CVPixelBuffer. And the time it takes for this is around 40ms (not enough to hit 60fps). And there is nothing in Lottie iOS that lets me get the raw image data.

Anyway I have a hit a bug with Flutter so will be blocked until that is fixed.

Code is available at http://github.com/harana/fluttie for now.

nadenf avatar Jun 09 '18 23:06 nadenf

Well that's unfortunate. Still, thank you for trying this out!

simolus3 avatar Jun 10 '18 07:06 simolus3

@baank This is maybe a stupid question, but isnt it possible to use a package like https://github.com/airbnb/lottie-ios for iOS to use its api to make it work? Or is this a "flutter to ios communication" problem?

HallerPatrick avatar Jun 16 '18 20:06 HallerPatrick

You can see the code in my fork. I already use Lottie-ios. The problem is that it outputs to a UIView whilst Flutter needs it in a CV buffer. I have an implementation that might already work and am in the process of testing it now.

nadenf avatar Jun 17 '18 00:06 nadenf

@baank Thanks for the enlightenment. Looking forward to it!

HallerPatrick avatar Jun 18 '18 16:06 HallerPatrick

I don’t think I can be of much help as I am very new to iOS dev but I want you to know that I am very interested in your progress!

lukepighetti avatar Jun 21 '18 01:06 lukepighetti

@baank Thank you for your contiribution despite being extremely busy:bow: I would like to know the current status. If you push your current to the branch, it may be helpful to you!

nakashima-koki avatar Jul 10 '18 07:07 nakashima-koki

@nakashima-koki .. I don't want to push anything to this repo unless it actually works.

Unfortunately I am pretty much stuck as I just don't know enough about the internals of how Fluttie works to know whether I am on the write track or not. Hopefully what I have can be helpful to someone though.

nadenf avatar Jul 10 '18 07:07 nadenf

I'm wondering if anyone is still working on this?

Maybe after the PlatformView for iOS released, we can just call the iOS Native lottie library and wrap it in a Widget.

panuavakul avatar Nov 23 '18 02:11 panuavakul

Also interested in this. Would love to see some love for the iOS users <3

gtupak avatar Feb 20 '19 22:02 gtupak

Also, Skia has native Lottie support, there is an issue regarding adding native support. https://github.com/flutter/flutter/issues/20438

lukepighetti avatar Feb 21 '19 18:02 lukepighetti

To anyone still wanting to use Lottie animations on iOS, I had the same thoughts a few days ago, and I decided to create a new iOS Lottie animations plugin for Flutter. It is still in the very early stage of development, but uses PlatformViews and works fine for now, so it is a 'native' approach to Lottie on iOS. It is written in Swift, so you have to fix a few things on your XCode files before, but it's worth it. I will be working on improvements during the next few days, to release a fuller version than the current v0.2.0. You can still try to use it via pub, or on github.

aroblast avatar Jul 18 '19 11:07 aroblast

Any update on this? @aroblast do you think you will/could merge your code for iOS with this plugin? An all featured plugin for Lottie on Flutter would be really useful! There's still the web version but adding one brick at a time, iOS would be great!

NicolasDionB avatar Nov 19 '19 13:11 NicolasDionB

@NicolasDionB I am currently trying to find time to improve flotter but I don't think I'll be able to merge it, because it seems fluttie doesn't use the new PlatformViews as I'm using in flotter. I'm still working on Android integration slowly though, I hope I'll be able to implement it soon!

aroblast avatar Nov 30 '19 14:11 aroblast