Sharpnado.Maui.Nuke
Nuke 12 for Maui. Since MAUI, the Android platform get a native caching library: Glide. Unfortunately on, iOS, there is no native caching... Sharpnado.Maui.Nuke is here to repair this injustice by implementing image caching with the fastest and most popular ios native caching library: Nuke.
Install
| Product | Versions |
|---|---|
| .NET |
README
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 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 12.8.
Installation
Basic Setup
public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp<App>()
.UseSharpnadoNuke(loggerEnable: false);
return builder.Build();
}
Advanced Configuration
public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp<App>()
.UseSharpnadoNuke(
loggerEnable: true, // Enable logging
cacheOnlyRemoteImages: true); // Cache only HTTP/HTTPS images (v12.8.1+)
return builder.Build();
}
Configuration Options
loggerEnable(default:false): Enable debug logging for troubleshootingcacheOnlyRemoteImages(default:false, since v12.8.1): Whentrue, only caches remote images (HTTP/HTTPS), excludes localfile://URIs
BOOM
You just achieved 90%+ memory reduction when manipulating Image views on iOS and MacCatalyst.
Platform Support
Since version 12.8.1, Maui.Nuke compiles for all MAUI platforms for easier integration:
| Platform | Nuke Caching | Behavior |
|---|---|---|
| iOS 15.0+ | âś… Active | Full Nuke 12.8 native caching |
| MacCatalyst 15.0+ | âś… Active | Full Nuke 12.8 native caching |
| Android API 21+ | ❌ No-op | Uses MAUI's built-in Glide (already excellent) |
| Windows 10.0.17763.0+ | ❌ No-op | Uses MAUI's built-in caching |
Why multi-platform compilation?
- Single package for all platforms (no conditional
PackageReference) - Simplified project setup
- Future-ready for potential enhancements
Use Cases for cacheOnlyRemoteImages
The cacheOnlyRemoteImages: true option (v12.8.1+) is useful when:
âś… You want to cache only network images (HTTP/HTTPS)
- Saves disk space by not caching bundled/local images
- Focuses cache on images that are slow to load
❌ Skip caching for local images (file:// URIs)
- Local images from Resources folder
- Bundled images
- Embedded images
Example:
.UseSharpnadoNuke(
loggerEnable: false,
cacheOnlyRemoteImages: true) // Only cache HTTP/HTTPS images
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).
Changes from Previous Version
Adoption Assessment
Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.
Related Guides & Workflows
Learn how to evaluate, integrate, or audit this package in your .NET project.