SwiftBindings.Lottie 4.6.3

dotnet add package SwiftBindings.Lottie --version 4.6.3
                    
NuGet\Install-Package SwiftBindings.Lottie -Version 4.6.3
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SwiftBindings.Lottie" Version="4.6.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SwiftBindings.Lottie" Version="4.6.3" />
                    
Directory.Packages.props
<PackageReference Include="SwiftBindings.Lottie" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add SwiftBindings.Lottie --version 4.6.3
                    
#r "nuget: SwiftBindings.Lottie, 4.6.3"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package SwiftBindings.Lottie@4.6.3
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=SwiftBindings.Lottie&version=4.6.3
                    
Install as a Cake Addin
#tool nuget:?package=SwiftBindings.Lottie&version=4.6.3
                    
Install as a Cake Tool

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 Compatible and additional computed target framework versions.
.NET net10.0-ios26.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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