Sharpnado.Maui.Nuke
10.11.2
dotnet add package Sharpnado.Maui.Nuke --version 10.11.2
NuGet\Install-Package Sharpnado.Maui.Nuke -Version 10.11.2
<PackageReference Include="Sharpnado.Maui.Nuke" Version="10.11.2" />
paket add Sharpnado.Maui.Nuke --version 10.11.2
#r "nuget: Sharpnado.Maui.Nuke, 10.11.2"
// Install Sharpnado.Maui.Nuke as a Cake Addin #addin nuget:?package=Sharpnado.Maui.Nuke&version=10.11.2 // Install Sharpnado.Maui.Nuke as a Cake Tool #tool nuget:?package=Sharpnado.Maui.Nuke&version=10.11.2
Maui.Nuke
Since MAUI, the Android
platform get a native caching library: Glide
.
Unfortunately on, iOS
, there is no native caching...
Maui.Nuke
is here to repair this injustice by implementing image caching with the fastest and most popular ios native caching library: Nuke.
Moreover, once installed, it is completly transparent to the user, you use your Image
views just like before, all the work is done under the hood.
This project is using the NukeProxy library, which is a Swift .net6 proxy to the nuke native library. The new binding and the packaging has been done by the great @cheesebaron. Hail to the Cheese!
Current version of the Nuke library is 10.3.1.
Installation
public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp<App>()
.UseNuke(showDebugLogs: false);
}
BOOM
You just achieved 90%+ memory reduction when manipulating Image
views.
Known Issues
Maui.Nuke
cannot cache images coming from the Asset Catalog:
https://docs.microsoft.com/en-us/xamarin/ios/app-fundamentals/images-icons/displaying-an-image
This is due to the fact that the Asset Catalogue
is packed in the ipa, and you cannot get an image URI from it.
Since version 8.4.1, it will however cache correctly images respecting the density convention (@2x, @3x) locating in your Resources
folder (see Issue #13).
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0-ios16.1 is compatible. net6.0-maccatalyst16.1 is compatible. net7.0-ios was computed. net7.0-maccatalyst was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. |
-
net6.0-ios16.1
- ImageCaching.Nuke (>= 2.0.13)
- System.Runtime.InteropServices.NFloat.Internal (>= 6.0.1)
-
net6.0-maccatalyst16.1
- ImageCaching.Nuke (>= 2.0.13)
- System.Runtime.InteropServices.NFloat.Internal (>= 6.0.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
First .Net 6 (MAUI) release \o/