Closed follesoe closed 3 years ago
I was able to work around the issue by:
if (DeviceInfo.Platform == DevicePlatform.Android)
{
animationView.ImageAssetsFolder = "LottieAnimations/Images";
}
The iOS images were loaded from the asset catalog as before.
I don't think ImageAssetsFolder was used at all in the 3.x version. So it might be this works as intended now, and maybe you only should set it on Android when not using a seperate bundle on iOS?
Can you debug this?
I've added some checks, so maybe this works a bit better now. Can you test?
I will test when back at work tomorrow. It may be like you said that it was simply ignored on iOS. Will provide feedback once verified/tested further.
I think we can conclude that the ImageAssetsFolder
was ignored in the 3.0 release. Tested setting the property on iOS and I do not get a runtime exception in version 4.0.6.
🐛 Bug Report
After updating from v3.1.3 to v4.0.4 I get an exception in animation using
ImageAssetsFolder
on iOS. The animation worked fine in v3.1.3.The animation plays fine in the Android version of my app on v4.0.4 (I am using the Xamarin.Forms component).
The exception I get is:
Looking at the source code, the relevant lines are: https://github.com/Baseflow/LottieXamarin/blob/develop/Lottie.Forms/Platforms/Ios/AnimationViewExtensions.cs#L24
Expected behavior
The animation should play on iOS the same way it does on Android, and in version 3.1.3 on iOS.
Reproduction steps
If needed I can provide the specific animation later. My XAML element looks like this:
The
ImageAssetFolder
property is set like this:animationView.ImageAssetsFolder = "LottieAnimations/Images";
.On iOS, the images are added to the asset catalog. Could this perhaps be the source of the issue?
Configuration
Version: 4.04
Platform: