Plugin.Maui.Spine.Widgets 0.1.37

dotnet add package Plugin.Maui.Spine.Widgets --version 0.1.37
                    
NuGet\Install-Package Plugin.Maui.Spine.Widgets -Version 0.1.37
                    
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="Plugin.Maui.Spine.Widgets" Version="0.1.37" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Plugin.Maui.Spine.Widgets" Version="0.1.37" />
                    
Directory.Packages.props
<PackageReference Include="Plugin.Maui.Spine.Widgets" />
                    
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 Plugin.Maui.Spine.Widgets --version 0.1.37
                    
#r "nuget: Plugin.Maui.Spine.Widgets, 0.1.37"
                    
#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 Plugin.Maui.Spine.Widgets@0.1.37
                    
#: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=Plugin.Maui.Spine.Widgets&version=0.1.37
                    
Install as a Cake Addin
#tool nuget:?package=Plugin.Maui.Spine.Widgets&version=0.1.37
                    
Install as a Cake Tool

Plugin.Maui.Spine.Widgets

Home-screen widgets, Live Activities and Control Center / Quick Settings controls for .NET MAUI, built from C#. The app builds a small view tree, Spine serializes it, and a generic native renderer draws it: SwiftUI in a WidgetKit extension on iOS (compiled with swiftc during the app's build, no Xcode project) and RemoteViews on Android. No app-specific Swift, no Android platform code.

dotnet add package Plugin.Maui.Spine.Widgets
builder
    .UseSpine(options => options.AddAssembly(typeof(MauiProgram).Assembly));   // registers Widgets too
    // .UseSpineWidgets(o => o.OpenWith<HomePage>())                           // only to change the options

<ItemGroup>
  <SpineWidget Include="next-start" DisplayName="Next start" Families="Small,Medium" />
</ItemGroup>
[Widget("next-start")]
public sealed class NextStartWidget(IRaceService races, IWidgetService widgets) : IWidgetProvider
{
    public async Task<WidgetTimeline> BuildTimelineAsync(WidgetContext context, CancellationToken cancellationToken)
    {
        var start = await races.NextStartAsync(cancellationToken);

        return WidgetTimeline
            .Single(new Dictionary<WidgetFamily, WidgetNode>
            {
                [WidgetFamily.Small] = W.VStack(6,
                    W.Text("Next start").Caption().Secondary(),
                    W.Timer(start.Time).Title().Bold()),
            })
            .Refresh(TimeSpan.FromMinutes(30))
            .OpenUrl(widgets.LinkFor(context.Kind));
    }
}

Besides text, timers, icons, pictures, bars and rings, the tree draws charts of its own: W.Sparkline(points, from, to) is a line over time with an optional target band, area and last-value dot. The platform draws it from the values, so a server can push it inside a Live Activity, where a stored picture cannot go.

Controls — a toggle or a button in iOS 18's Control Center, on the Lock Screen and the Action button, and an Android Quick Settings tile — come from the same package: a <SpineControl Include="goal-alerts" Type="Toggle" /> item and a [Control("goal-alerts")] class implementing IControlProvider. A tap runs the provider's OnActionAsync in the app's process without opening the app.

An app whose only surface is a Live Activity, with no <SpineWidget>, sets <SpineWidgetsLiveActivities>true</SpineWidgetsLiveActivities> in the project to get the extension (iOS) and the notification permissions (Android) all the same.

On iOS the app needs an App Group entitlement shared with the extension; the package's build targets write it. The documentation covers the developer-portal steps device builds need.

Platforms: iOS 17+ (home-screen and Lock Screen widgets, Live Activities; controls on iOS 18+; a Live Activity layout of its own for CarPlay and the Apple Watch Smart Stack on iOS 18+ with SpineWidgetsLiveActivitySmall) and Android 5+ (home-screen widgets; Live Activities on Android 16+ as Live Updates; Quick Settings tiles on Android 7+). Every other platform, Mac Catalyst included, gets no-op services and IWidgetService.IsSupported == false.

Documentation

Product Compatible and additional computed target framework versions.
.NET net10.0-android36.0 is compatible.  net10.0-ios26.0 is compatible.  net10.0-maccatalyst26.0 is compatible.  net10.0-windows10.0.19041 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
0.1.37 33 10/30/2026
0.1.36 81 10/27/2026
0.1.35 81 10/27/2026
0.1.34 81 10/27/2026
0.1.33 76 10/27/2026
0.1.32 80 10/27/2026
0.1.31 82 10/27/2026
0.1.30 71 10/27/2026
0.1.29 88 10/26/2026
0.1.28 82 10/26/2026
0.1.27 88 10/26/2026
0.1.26 98 10/24/2026
0.1.25 87 10/24/2026
0.1.24 94 10/23/2026
0.1.23 87 10/23/2026
0.1.22 92 10/23/2026
0.1.21 88 10/23/2026
0.1.20 92 10/23/2026
0.1.19 88 10/22/2026
0.1.18 98 10/21/2026
Loading failed