HI everyone, I have created my first ever library....
# multiplatform
i
HI everyone, I have created my first ever library. It's a Kotlin multiplatform lottie animation library. Version 1 is out now. https://github.com/ismai117/kottie/blob/main/README.md Try it out, and I appreciate any feedback. It works on Android, iOS, and desktop. I'm now working on the web part.
K 4
thank you color 3
🎉 4
j
Really impressive. I was doing it in multiplatform way because there was no library for that. but i can do it in 2 lines of code. Thank you for the library
Do i need to add any ios code?
i
Nope, just kotlin. you dont need any *expect*/*actual* mechanisms
j
That's great.
s
@Farhazul Mullick ^^
👍 1
f
You are using Skottie Graphics for kotlin-native target, right?
i
Yep that's correct, for the Android side. It's using lottie
a
@Ismail Does it supports base64 images rendering in iOS ?
i
No, just animations, URL | file | jsonstring
a
@Ismail do you have any idea how I can render lottie file that contain base64 images in CMP ios ?
i
Try converting it to a byte or use readbytes() then decodeToString and add it to jsonstring spec for Kottie Or you can send me a Lottie file with base64 images. I can test it out
a
@Ismail Sure, can you try this file please and lemme know if you have any ideas
i
I've tested it out and it doesn't work with base 64 embedded images, i will implement a workaround for it. It might take a while but thanks for letting me know.
a
@Ismail thank you for your help and it would be great if you could share the workaround with us once done please because it’s blocking one of our features, thanks again
i
I've finally added Lottie ios, your Lottie file works on kottie
j
isn't it supported lottie animation json file supported previously on the ios?
i
It did but it wasn't using Lottie ios, i was using skottie to render animations for iOS. The reason why I changed it was because embedded png images in Lottie json files don't work with skia/skottie
j
I've look through the source code. So, i think you're using android version of lottie in ios code. am i right?
i
Yep, Lottie-ios. Android - renders animation via Lottie iOS - renders animation via Lottie Desktop - renders animation via Skia/Skottie Web - renders animation via Skia/Skottie
🙌 1
r
How we are providing path of file