SwiftBindings.Lottie
4.6.3
dotnet add package SwiftBindings.Lottie --version 4.6.3
NuGet\Install-Package SwiftBindings.Lottie -Version 4.6.3
<PackageReference Include="SwiftBindings.Lottie" Version="4.6.3" />
<PackageVersion Include="SwiftBindings.Lottie" Version="4.6.3" />
<PackageReference Include="SwiftBindings.Lottie" />
paket add SwiftBindings.Lottie --version 4.6.3
#r "nuget: SwiftBindings.Lottie, 4.6.3"
#:package SwiftBindings.Lottie@4.6.3
#addin nuget:?package=SwiftBindings.Lottie&version=4.6.3
#tool nuget:?package=SwiftBindings.Lottie&version=4.6.3
SwiftBindings.Lottie
Native Swift interop bindings for Lottie, Airbnb's library for rendering After Effects animations natively on iOS. These are not Objective-C proxy wrappers — they use .NET 10's native Swift interop for direct, high-performance calls into Swift APIs from C#.
Installation
dotnet add package SwiftBindings.Lottie
Requirements
- .NET 10.0+
- iOS 15.0+
- macOS host for development
Usage
Load and play an animation
using Lottie;
// Load from a bundled JSON file
var animation = LottieAnimation.Named("LoadingSpinner");
// Create the animation view and play
var animView = new LottieAnimationView();
animView.Animation = animation;
animView.LoopMode = LottieLoopMode.Loop;
animView.Play();
Playback control
// Play, pause, stop
animView.Play();
animView.Pause();
animView.Stop();
// Play a specific progress range
animView.Play(fromProgress: 0.0, toProgress: 0.5);
// Adjust speed and check state
animView.AnimationSpeed = 1.5;
var isPlaying = animView.IsAnimationPlaying;
// Scrub to a specific frame or progress
animView.CurrentProgress = 0.5;
animView.CurrentFrame = 30.0;
animView.ForceDisplayUpdate();
Animation properties
var animation = LottieAnimation.Named("Confetti");
var duration = animation.Duration;
var framerate = animation.Framerate;
var startFrame = animation.StartFrame;
var endFrame = animation.EndFrame;
var markers = animation.MarkerNames;
Cache management
var cache = DefaultAnimationCache.SharedCache;
cache.CacheSize = 50;
// Cache and retrieve animations
cache.SetAnimation(animation, "my-key");
var cached = cache.Animation("my-key");
cache.ClearCache();
Colors and value providers
// Create colors (RGBA 0.0-1.0)
var color = new LottieColor(1.0, 0.5, 0.25, 1.0);
// Or with 0-255 range
var color255 = new LottieColor(255.0, 128.0, 64.0, 255.0,
ColorFormatDenominator.TwoFiftyFive);
// Dynamic value providers for animation properties
var floatProvider = new FloatValueProvider(0.75);
var sizeProvider = new SizeValueProvider((Swift.CGSize)new CGSize(100, 200));
var pointProvider = new PointValueProvider((Swift.CGPoint)new CGPoint(50, 75));
How It Works
These bindings are auto-generated by Swift Dotnet Bindings using .NET 10's native Swift interop via the SwiftBindings SDK.
Building from Source
Only needed if you're contributing or building the package locally.
# One-time: install the pinned Nuke CLI from .config/dotnet-tools.json
dotnet tool restore
# Build the package end-to-end (xcframework + bindings + dotnet build)
dotnet nuke BuildLibrary --library Lottie
License
The bindings are MIT licensed. Lottie itself is Apache 2.0 licensed — see Lottie's license.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0-ios26.0 is compatible. |
-
net10.0-ios26.0
- SwiftBindings.Apple (>= 26.2.6)
- SwiftBindings.Runtime (>= 0.14.0 && < 0.15.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.6.3 | 75 | 6/11/2026 |
| 4.6.2 | 96 | 6/1/2026 |
| 4.6.1 | 108 | 5/3/2026 |
| 4.6.0 | 112 | 4/2/2026 |
| 4.6.0-preview.2 | 68 | 3/27/2026 |