Skip to content

fix(canary): override SkiaSharp to 4.148.0 on native iOS canary builds#1254

Closed
ramezgerges wants to merge 1 commit into
masterfrom
dev/ramez/fix-canary-ios-skiasharp
Closed

fix(canary): override SkiaSharp to 4.148.0 on native iOS canary builds#1254
ramezgerges wants to merge 1 commit into
masterfrom
dev/ramez/fix-canary-ios-skiasharp

Conversation

@ramezgerges

@ramezgerges ramezgerges commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Related to unoplatform/uno#23680

Problem

The canary native iOS Release build has failed daily since 2026-05-25 with:

ILLINK : error MT0099: Can't create a token reference to an unregistered type when using the managed static registrar: SkiaSharp.Views.Windows.SKSwapChainPanel
error NETSDK1144: Optimizing assemblies for size failed.

SkiaSharp 3.119.4 (published 2026-05-25, pinned by Uno.Sdk dev) ships its iOS assets as net10.0-ios26.2. CI builds with Xcode 26.1.1 / iOS 26.1, so NuGet cannot select the platform asset and silently falls back to the platform-neutral net10.0 assembly. That assembly's SKSwapChainPanel has no ObjC [Register] attribute (verified by binary inspection), and on the native-rendering head — where FrameworkElement derives from NSObject — the managed-static registrar fails at ILLink. The Skia-renderer iOS leg is unaffected.

The upstream TFM fix (mono/SkiaSharp#3798, 26.2 → 26.0) shipped in SkiaSharp 4.147.0-preview.2+; no 3.119.5 backport exists on nuget.org or the skia-eap feed.

Fix

Override SkiaSharpVersion to 4.148.0 (ships net10.0-ios26.0 assets) via the Uno.Sdk's override property, scoped to UseNativeRendering=true + iOS + canaries/* branches so master keeps the stable Uno.Sdk pin (3.119.1) for the store app.

Verification (local, Xcode 26.1.1 + iOS workload 26.1, mirroring CI)

  • Reproduced the exact MT0099/NETSDK1144 failure with Uno.Sdk 6.7.0-dev.105 before the change.
  • With the override: all SkiaSharp packages unify on 4.148.0 with proper net10.0-ios26.0 assets, and dotnet publish -f net10.0-ios -c Release -p:UseNativeRendering=true succeeds end-to-end (.app/.ipa produced).
  • Without the canary branch variable the override is inert: dev SDK resolves 3.119.4, stable SDK resolves 3.119.1, unchanged.

Notes

  • On canary, Lottie/Skottie and Svg.Skia now run against SkiaSharp 4.148.0 — worth watching the iOS UI tests for rendering regressions.
  • Remove this override once the Uno.Sdk dev pin moves off 3.119.4 (or a 3.119.x backport ships).

🤖 Generated with Claude Code

SkiaSharp 3.119.4 (pinned by Uno.Sdk dev) ships its iOS assets as
net10.0-ios26.2, which cannot be consumed when targeting iOS 26.1 or
lower. NuGet falls back to the platform-neutral net10.0 assembly, whose
SKSwapChainPanel is not ObjC-registered, and the managed-static
registrar fails with MT0099 on native-rendering iOS Release builds.

Override SkiaSharpVersion to 4.148.0 (ships net10.0-ios26.0 assets) on
canary branches only, so master keeps the stable Uno.Sdk pin (3.119.1).

Fixes #1253

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Comment thread Uno.Gallery/Uno.Gallery.csproj
@agneszitte

Copy link
Copy Markdown
Member

Superseded by #1255. Moving this off master to canaries/dev only — per the team convention of keeping canary-only workarounds on the canary branch and leaving the default branch untouched (discussed with Ramez/Jenny). Same native-iOS SkiaSharp 4.148.0 override; the branch-source condition is dropped since #1255 lives on canaries/dev. Related to unoplatform/uno#23680

@agneszitte agneszitte closed this Jul 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants