Skip to content

[iOS/Mac Catalyst] Resizetizer: Support Icon Composer MauiIcon bundles - #38958

Merged
kubaflo merged 10 commits into
net11.0from
jfversluis-native-apple-icon-support
Sep 28, 2026
Merged

kubaflo merged 10 commits into
net11.0from
jfversluis-native-apple-icon-support

Conversation

@jfversluis

@jfversluis jfversluis commented Sep 28, 2026 •

Copy link
Copy Markdown
Member

Note

Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!

Description of Change

Adds Apple Icon Composer .icon bundle support to the existing MauiIcon item for iOS and Mac Catalyst on the net11.0 branch. The underlying Apple asset compiler support was introduced by dotnet/macios#24722 in Apple workload 26.5.11720-net11-p6.

When an Apple-targeted MauiIcon has a case-insensitive .icon extension, MAUI now:

  • bypasses Resizetizer/SkiaSharp for that icon only;
  • recursively passes the bundle children to the Apple build as ImageAsset items;
  • derives AppIcon from the .icon directory name;
  • clears the parsed private _XSAppIconAssets value after _ReadAppManifest, avoiding conflicts with the template's legacy XSAppIconAssets entry without modifying the user's Info.plist;
  • tracks nested additions, deletions, renames, and content updates for incremental ACTool builds;
  • exports .icon MauiIcons through the existing project-reference item flow.

The existing MauiIcon path remains unchanged for ordinary SVG/PNG projects and all non-Apple targets. Users condition the .icon item to iOS/Mac Catalyst and retain their existing SVG/PNG MauiIcon for other TFMs; no new item type or public metadata API is introduced.

Validation reports clear errors for unsupported Apple workloads, missing bundle directories, missing root icon.json, empty Assets, multiple .icon icons, mixed native/ordinary icons for one Apple TFM, and conflicting AppIcon values.

Compatibility

  • Targets the MAUI net11.0 branch rather than adding a product-code TFM gate.
  • Requires Apple workload 26.5.11720-net11-p6 or newer.
  • Does not weaken Xcode or workload checks.

Testing

  • Focused Native Apple icon MSBuild tests: 10 passed.
  • Integration-test compilation/discovery: 2 passed.
  • Built a complete Resizetizer package from this branch and clean-built real iOS simulator and Mac Catalyst apps using Apple workload 26.5.11720-net11-p6.
  • Verified both Assets.car files contain layered IconImageStack renditions and final plists select the bundle-derived icon.
  • Verified no-op, content update (including an older input timestamp), deletion/rename, clean rebuild, .icon to SVG switching, runtime Mac Catalyst launch, and direct inspection of the generated .icns.

Issues Fixed

Enables the MAUI side of dotnet/macios#24722. No public MAUI issue is linked.

Recognize .icon bundles on Apple targets, pass their contents to the Apple asset compiler, preserve legacy MauiIcon behavior elsewhere, and add focused incremental and integration coverage.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings September 28, 2026 13:19
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 38958

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 38958"

@jfversluis
jfversluis changed the base branch from main to net11.0 September 28, 2026 13:19
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@github-actions

Copy link
Copy Markdown
Contributor

Skill Validation Results

@jfversluis — new skill validation results are available based on this last commit: 3fba742.
To request a fresh validation after new comments or commits, comment /evaluate-skills.

Overall Passed Static Passed LLM Skipped Skills 25 Agents 6

✅ Skill Validation Results — 3fba742 · [iOS/Mac Catalyst] Resizetizer: Support Icon Composer MauiIcon bundles · 2026-09-28T13:21:24Z

✅ Static Checks Passed

Skills: 25 | Eval specs linted: 17

Full lint output
── .github/skills/agentic-labeler/tests/eval.vally.yaml
Vally collects pseudonymous usage telemetry (command name, version, outcome, duration, persistent device identifier (when available), and coarse OS/runtime info) to improve the product. No prompts, datasets, file paths, or arguments are collected.
Opt out any time by setting VALLY_TELEMETRY_OPTOUT=1 or DO_NOT_TRACK=1.
Learn more: https://aka.ms/vally/telemetry
✔ .github/skills/agentic-labeler/tests/eval.vally.yaml is valid
── .github/skills/analyze-sessions/tests/eval.vally.yaml
✔ .github/skills/analyze-sessions/tests/eval.vally.yaml is valid
── .github/skills/ci-fix/tests/eval.ownership.vally.yaml
✔ .github/skills/ci-fix/tests/eval.ownership.vally.yaml is valid
── .github/skills/ci-fix/tests/eval.vally.yaml
✔ .github/skills/ci-fix/tests/eval.vally.yaml is valid
── .github/skills/code-review/tests/eval.inline-findings.vally.yaml
✔ .github/skills/code-review/tests/eval.inline-findings.vally.yaml is valid
── .github/skills/code-review/tests/eval.producer-trace.vally.yaml
✔ .github/skills/code-review/tests/eval.producer-trace.vally.yaml is valid
── .github/skills/code-review/tests/eval.trim-aot.vally.yaml
✔ .github/skills/code-review/tests/eval.trim-aot.vally.yaml is valid
── .github/skills/code-review/tests/eval.vally.yaml
✔ .github/skills/code-review/tests/eval.vally.yaml is valid
── .github/skills/code-review/tests/hermeticity.vally.yaml
✔ .github/skills/code-review/tests/hermeticity.vally.yaml is valid
── .github/skills/code-review/tests/soak.capability.vally.yaml
✔ .github/skills/code-review/tests/soak.capability.vally.yaml is valid
── .github/skills/evaluate-pr-tests/tests/eval.vally.yaml
✔ .github/skills/evaluate-pr-tests/tests/eval.vally.yaml is valid
── .github/skills/pr-review/tests/eval.gh-auth.vally.yaml
✔ .github/skills/pr-review/tests/eval.gh-auth.vally.yaml is valid
── .github/skills/review-test-failures/tests/eval.vally.yaml
✔ .github/skills/review-test-failures/tests/eval.vally.yaml is valid
── .github/skills/try-fix/tests/eval.restore.vally.yaml
✔ .github/skills/try-fix/tests/eval.restore.vally.yaml is valid
── .github/skills/try-fix/tests/eval.vally.yaml
✔ .github/skills/try-fix/tests/eval.vally.yaml is valid
── .github/skills/verify-tests-fail-without-fix/tests/eval.protocol.vally.yaml
✔ .github/skills/verify-tests-fail-without-fix/tests/eval.protocol.vally.yaml is valid
── .github/skills/verify-tests-fail-without-fix/tests/eval.vally.yaml
✔ .github/skills/verify-tests-fail-without-fix/tests/eval.vally.yaml is valid

⏭️ LLM Evaluation: Skipped

No changed skills with eval specs found.

🔍 Full results and investigation steps

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

Native-to-ordinary icon cache invalidation and .DS_Store validation issues remain unresolved.

Review effort: Lite
Findings: None

What changed in this PR

Adds Apple Icon Composer .icon bundle support for iOS and Mac Catalyst MauiIcon items.

Changes:

  • Forwards native icon bundles to Apple asset compilation.
  • Adds validation, manifest handling, incremental tracking, and project-reference support.
  • Adds unit and integration test coverage.
File Summary
src/​TestUtils/​src/​Microsoft.Maui.IntegrationTests/​ResizetizerTests.cs Tests Apple builds and incremental scenarios.
src/​SingleProject/​Resizetizer/​test/​UnitTests/​NativeAppleIconTargetsTests.cs Tests target behavior and validation.
src/​SingleProject/​Resizetizer/​src/​nuget/​buildTransitive/​Microsoft.Maui.Resizetizer.After.targets Implements native .icon processing and cache handling.

Ignore Finder metadata when validating Icon Composer assets and assert that native catalog renditions are removed when switching back to an ordinary MauiIcon.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 28, 2026 13:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Unresolved critical test-loading and Mac Catalyst coverage issues, along with additional validation gaps, block approval.

Review effort: Lite
Findings: 2 High severity

Open (2)

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 28, 2026 13:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Fix native-to-ordinary cache invalidation and the affected integration test, and add nested-asset coverage.

Review effort: Lite
Findings: 1 High severity

Open (1)
Resolved since last review (2)

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 28, 2026 14:25
@kubaflo

This comment has been minimized.

@kubaflo

kubaflo commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

/azp run

@github-actions github-actions Bot added the s/agent-review-in-progress AI review is currently running for this PR label Sep 28, 2026
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).

@github-actions

Copy link
Copy Markdown
Contributor

Note

🔍 /review started

AzDO build 15486664 is running for catalyst.

The s/agent-review-in-progress label stays on this PR while the run is active. The final recommendation and outcome labels are posted only after Gate, expert review, and Deep UI tests finish.

Copilot AI review requested due to automatic review settings September 28, 2026 15:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

The SDK capability probe can select the wrong TFM pack and cause misleading failures; incremental assertions also need strengthening.

Review effort: Lite
Findings: None

Previously missed (1)

In code that hasn't changed since last review

Medium severity Capability probe matches packs from the wrong target framework

src/​TestUtils/​src/​Microsoft.Maui.IntegrationTests/​ResizetizerTests.cs:873

The capability probe accepts any Microsoft.iOS.Sdk*/Microsoft.MacCatalyst.Sdk* pack, including the net10 packs that are installed alongside net11 (see eng/Versions.props:70-77). Thus a sufficiently new net10 pack can make this test run even when the net11 pack selected by framework = net11.0-{platform} is too old, producing a misleading build failure instead of skipping. Restrict the glob to the current TFM (for example Microsoft.iOS.Sdk.{DotNetCurrent}_* and the corresponding Mac Catalyst pattern).

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 28, 2026 15:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

Several moderate test coverage gaps leave native bypass and incremental invalidation insufficiently verified.

Review effort: Lite
Findings: None

Previously missed (1)

In code that hasn't changed since last review

Medium severity Content updates lack assertion that compiled output changes

src/​TestUtils/​src/​Microsoft.Maui.IntegrationTests/​ResizetizerTests.cs:84

The content-update step replaces front.png and rebuilds, but the only assertion here is that the build succeeds. A regression where ACTool reuses the old compiled pixels would still pass because the test never compares the resulting asset/cache before and after this update. Capture a content-sensitive output (or an equivalent ACTool input/invalidation signal) and assert that it changes after the overwrite.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 28, 2026 16:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

Apple build integration and incremental asset behavior warrant final human review; the reported test count also needs correction.

Review effort: Lite
Findings: 1 Low severity

Open (1)

@kubaflo

This comment has been minimized.

@kubaflo

kubaflo commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

/azp run

@github-actions github-actions Bot added the s/agent-review-in-progress AI review is currently running for this PR label Sep 28, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Note

🔍 /review started

AzDO build 15488727 is running for catalyst.

The s/agent-review-in-progress label stays on this PR while the run is active. The final recommendation and outcome labels are posted only after Gate, expert review, and Deep UI tests finish.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).

@MauiBot MauiBot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI Review Summary

@jfversluis — new AI review results are available based on commit 5dae453.

Gate Inconclusive Confidence Medium Platform MacCatalyst


🗂️ Review Sessions — click to expand
🚦 Gate — Test Before & After Fix

Gate Result: ⚠️ INCONCLUSIVE

Platform: CATALYST · Base: net11.0 · Merge base: 328551f6

🩺 Base branch does not compile — the without-fix build failed. The gate's "does the test fail without the fix" check is unreliable here; this usually means main is broken or a merge-base file went missing. Investigate before trusting this gate.

[xUnit.net 00:00:02.52] /private/tmp/maui-native-icon-37a87b25ef2d4c179be324a85a69e7b7/Test.proj(29,26): error MSB4057: The target "_CollectMauiNativeAppleIcon" does not exist in the project.

Test Without Fix (expect FAIL) With Fix (expect PASS)
🧪 NativeAppleIconTargetsTests NativeAppleIconTargetsTests 🛠️ BUILD ERROR ✅ PASS — 30s
🔴 Without fix — 🧪 NativeAppleIconTargetsTests: 🛠️ BUILD ERROR · 19s

Error-relevant lines (filtered from the build log):

/private/tmp/maui-native-icon-37a87b25ef2d4c179be324a85a69e7b7/Test.proj(29,26): error MSB4057: The target "_CollectMauiNativeAppleIcon" does not exist in the project.
     at Microsoft.Maui.Resizetizer.Tests.NativeAppleIconTargetsTests.CollectsIconComposerBundleWithoutResizetizer() in /_/src/SingleProject/Resizetizer/test/UnitTests/NativeAppleIconTargetsTests.cs:line 26
   at Microsoft.Maui.Resizetizer.Tests.NativeAppleIconTargetsTests.ReportsUnsupportedWorkloadAndInvalidBundle(String workloadVersion, String expectedError) in /_/src/SingleProject/Resizetizer/test/UnitTests/NativeAppleIconTargetsTests.cs:line 164
   at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span`1 copyOfArgs, BindingFlags invokeAttr)
   at InvokeStub_NativeAppleIconTargetsTests.ReportsUnsupportedWorkloadAndInvalidBundle(Object, Span`1)
   at System.Reflection.MethodBaseInvoker.InvokeWithFewArgs(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
[xUnit.net 00:00:06.03]       /private/tmp/maui-native-icon-52043587c2c74c1ea66281dbfb5cfbf5/Test.proj(29,26): error MSB4057: The target "_CollectMauiNativeAppleIcon" does not exist in the project.
/private/tmp/maui-native-icon-52043587c2c74c1ea66281dbfb5cfbf5/Test.proj(29,26): error MSB4057: The target "_CollectMauiNativeAppleIcon" does not exist in the project.
     at Microsoft.Maui.Resizetizer.Tests.NativeAppleIconTargetsTests.LeavesOrdinaryAndNonAppleMauiIconsOnExistingPath() in /_/src/SingleProject/Resizetizer/test/UnitTests/NativeAppleIconTargetsTests.cs:line 80
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at Microsoft.Maui.Resizetizer.Tests.NativeAppleIconTargetsTests.ReportsMultipleAndMixedMauiIcons() in /_/src/SingleProject/Resizetizer/test/UnitTests/NativeAppleIconTargetsTests.cs:line 177
[xUnit.net 00:00:08.37]       /private/tmp/maui-native-icon-5989a859bc474eceb0706ffebbbb3597/Test.proj(29,26): error MSB4057: The target "_CollectMauiNativeAppleIcon" does not exist in the project.
/private/tmp/maui-native-icon-5989a859bc474eceb0706ffebbbb3597/Test.proj(29,26): error MSB4057: The target "_CollectMauiNativeAppleIcon" does not exist in the project.
     at Microsoft.Maui.Resizetizer.Tests.NativeAppleIconTargetsTests.InvalidatesAppleCachesWhenBundleChildContentChanges() in /_/src/SingleProject/Resizetizer/test/UnitTests/NativeAppleIconTargetsTests.cs:line 130
     at Microsoft.Maui.Resizetizer.Tests.NativeAppleIconTargetsTests.CollectsSingleAppleIconComposerBundleFromProjectReference() in /_/src/SingleProject/Resizetizer/test/UnitTests/NativeAppleIconTargetsTests.cs:line 238
[xUnit.net 00:00:10.80]       /private/tmp/maui-native-icon-09da4e1da722456ea05dfc1f8c1309d0/Test.proj(29,26): error MSB4057: The target "_CollectMauiNativeAppleIcon" does not exist in the project.
/private/tmp/maui-native-icon-09da4e1da722456ea05dfc1f8c1309d0/Test.proj(29,26): error MSB4057: The target "_CollectMauiNativeAppleIcon" does not exist in the project.
     at Microsoft.Maui.Resizetizer.Tests.NativeAppleIconTargetsTests.TracksBundleChildAddDeleteAndRename() in /_/src/SingleProject/Resizetizer/test/UnitTests/NativeAppleIconTargetsTests.cs:line 44
[xUnit.net 00:00:12.01]       /private/tmp/maui-native-icon-8691cf6a3e564493b8032b48721171bc/Test.proj(29,26): error MSB4057: The target "_CollectMauiNativeAppleIcon" does not exist in the project.
/private/tmp/maui-native-icon-8691cf6a3e564493b8032b48721171bc/Test.proj(29,26): error MSB4057: The target "_CollectMauiNativeAppleIcon" does not exist in the project.
     at Microsoft.Maui.Resizetizer.Tests.NativeAppleIconTargetsTests.InvalidatesAppleCachesWhenSwitchingToOrdinaryIcon() in /_/src/SingleProject/Resizetizer/test/UnitTests/NativeAppleIconTargetsTests.cs:line 103
🟢 With fix — 🧪 NativeAppleIconTargetsTests: PASS ✅ · 30s

(no coded error found; showing last 1200 chars)

loadVersion: "26.5.11720-net11-p6", expectedError: "must contain an icon.json file") [1 s]
  Passed Microsoft.Maui.Resizetizer.Tests.NativeAppleIconTargetsTests.ReportsUnsupportedWorkloadAndInvalidBundle(workloadVersion: "26.4.11514-net11-p4", expectedError: "requires the .NET Apple workload version") [1 s]
  Passed Microsoft.Maui.Resizetizer.Tests.NativeAppleIconTargetsTests.LeavesOrdinaryAndNonAppleMauiIconsOnExistingPath [2 s]
  Passed Microsoft.Maui.Resizetizer.Tests.NativeAppleIconTargetsTests.ReportsMultipleAndMixedMauiIcons [2 s]
  Passed Microsoft.Maui.Resizetizer.Tests.NativeAppleIconTargetsTests.InvalidatesAppleCachesWhenBundleChildContentChanges [4 s]
  Passed Microsoft.Maui.Resizetizer.Tests.NativeAppleIconTargetsTests.CollectsSingleAppleIconComposerBundleFromProjectReference [2 s]
  Passed Microsoft.Maui.Resizetizer.Tests.NativeAppleIconTargetsTests.TracksBundleChildAddDeleteAndRename [4 s]
[xUnit.net 00:00:27.69]   Finished:    Microsoft.Maui.Resizetizer.UnitTests
  Passed Microsoft.Maui.Resizetizer.Tests.NativeAppleIconTargetsTests.InvalidatesAppleCachesWhenSwitchingToOrdinaryIcon [2 s]
Test Run Successful.
Total tests: 10
     Passed: 10
 Total time: 27.9054 Seconds

⚠️ Failure Details

  • 🛠️ NativeAppleIconTargetsTests without fix: build failed before tests could run
    • [xUnit.net 00:00:02.52] /private/tmp/maui-native-icon-37a87b25ef2d4c179be324a85a69e7b7/Test.proj(29,26): error MSB4057: The target "_CollectMauiNativeAppleIcon" does not exist in the project.
📁 Fix files reverted (1 files)
  • src/SingleProject/Resizetizer/src/nuget/buildTransitive/Microsoft.Maui.Resizetizer.After.targets

📋 Pre-Flight — Context & Validation

PR #38958 Pre-Flight

Context

  • Title: [iOS/Mac Catalyst] Resizetizer: Support Icon Composer MauiIcon bundles
  • Base: net11.0 at merge base 328551f6f2fecdfe8213aceb94c979573bb24ac7
  • Materialized review commit: fe9bf5e12117c045d6ed71862ce748680fd1fff7
  • Platform: Mac Catalyst (catalyst in the review invocation)
  • Problem: MAUI's Resizetizer does not natively pass Apple Icon Composer .icon bundles through to the Apple asset compiler. The PR adds support for Apple workload 26.5.11720-net11-p6 and newer while preserving ordinary SVG/PNG and non-Apple behavior.

Existing PR Approach

The PR recognizes case-insensitive .icon MauiIcon items on Apple targets, removes them from the Resizetizer image path, validates bundle/workload/icon selection, recursively maps bundle children to ImageAsset, derives AppIcon, clears the legacy parsed _XSAppIconAssets selection, and hashes bundle children to invalidate ACTool caches for content/add/delete/rename changes.

Changed files:

  • src/SingleProject/Resizetizer/src/nuget/buildTransitive/Microsoft.Maui.Resizetizer.After.targets (+135/-1): product fix.
  • src/SingleProject/Resizetizer/test/UnitTests/NativeAppleIconTargetsTests.cs (+462): ten focused MSBuild target tests.
  • src/TestUtils/src/Microsoft.Maui.IntegrationTests/ResizetizerTests.cs (+193): iOS/Mac Catalyst package-build coverage.

Candidate Boundary

EstablishBrokenBaseline.ps1 is expected to expose only this existing product file in RevertedFiles; candidates must treat all other tracked files as read-only:

src/SingleProject/Resizetizer/src/nuget/buildTransitive/Microsoft.Maui.Resizetizer.After.targets

The worktree contains unrelated pre-existing script changes. Candidates must leave them untouched and use only pwsh .github/scripts/EstablishBrokenBaseline.ps1 -Restore for restoration.

Validation

Primary test only:

dotnet test src/SingleProject/Resizetizer/test/UnitTests/Resizetizer.UnitTests.csproj --filter "NativeAppleIconTargetsTests"

The recorded regression-risk scan is CLEAN with no mandatory regression tests. Do not run the integration suite or any full suite.

The prior gate is INCONCLUSIVE because removing the implementation makes the newly added tests reference a missing _CollectMauiNativeAppleIcon target. With the PR implementation present, all 10 focused tests passed in about 30 seconds. This gate result is not evidence that the PR fix fails, and gate verification must not be rerun.

Alternative-Fix Goal

Each candidate must independently implement one mechanism-level alternative to the PR's monolithic collection/cache-invalidating target design, preserve ordinary and non-Apple paths, perform the try-fix inline expert self-review, run the focused test once with at most one focused correction/retest, capture all required artifacts, and restore the baseline before reporting.


🔬 Code Review — Deep Analysis

Expert PR Evaluation

Verdict: LGTM
Confidence: Medium

The submitted fix correctly recognizes case-insensitive .icon MauiIcon bundles for iOS and Mac Catalyst, keeps them out of the Resizetizer image path, propagates project-reference icons, registers deterministic ImageAsset paths, derives AppIcon, clears the legacy manifest selection, and invalidates ACTool caches for content, add/delete/rename, and native-to-ordinary transitions. Ordinary SVG/PNG icons and non-Apple targets remain on the existing path.

The implementation is consistent with the downstream Apple SDK/ACTool item and cache semantics, including linked-catalog cloning. The focused tests cover the material compatibility and incremental-build scenarios.

Findings

No actionable findings. inline-findings.json contains an empty JSON array.

Reviewer Refinement

No corrective patch is warranted. The pr-plus-reviewer candidate therefore remains identical to the submitted PR.

The gate remained inconclusive and was not rerun. Confidence is capped at medium because this is platform-specific build integration and the gate could not establish the negative baseline.


🛠️ Try-Fix — Analysis & Comparison

Try-Fix Candidates

Candidate 1 — Manifest/Dependency-Driven Invalidation

Model: gpt-5.3-codex

Approach: Planned to replace the PR's monolithic native-icon collection plus child-hash ledger and explicit cache-delete targets with staged targets driven by manifest/dependency invalidation.

Result: Blocked before implementation or testing.

pwsh .github/scripts/EstablishBrokenBaseline.ps1 rejected the pre-existing dirty worktree and did not create .github/.baseline-state.json. Because no RevertedFiles allow-list existed, the candidate correctly made no product-code edits. The focused command

dotnet test src/SingleProject/Resizetizer/test/UnitTests/Resizetizer.UnitTests.csproj --filter "NativeAppleIconTargetsTests"

was not run. The candidate diff is empty, inline self-review recorded zero findings, and the mandatory restore command completed with the expected no-state result (Restored: False, no attempt edits existed).

Full report: ../try-fix-1/content.md

Candidate 2 — Atomic Aggregate-State Reconciler

Model: gpt-5.6-sol

Approach: Planned an always-run, atomic reconciliation operation that would enumerate the .icon tree, compute one deterministic fingerprint over normalized relative paths and file bytes, compare old and new aggregate state, and invalidate ACTool caches only when that state changes.

Difference from existing/prior approaches: Unlike the PR's per-child hash ledger and separate cache-invalidating targets, this design uses a single aggregate old/new state transition. Unlike candidate 1's planned staged manifest/dependency graph, it does not rely on MSBuild Inputs/Outputs inference or staged invalidation.

Result: Blocked before implementation or testing.

pwsh .github/scripts/EstablishBrokenBaseline.ps1 again rejected the same eight pre-existing dirty tracked scripts and did not create .github/.baseline-state.json. The candidate correctly did not bypass the guard or edit product code. The focused command

dotnet test src/SingleProject/Resizetizer/test/UnitTests/Resizetizer.UnitTests.csproj --filter "NativeAppleIconTargetsTests"

was not run. The candidate diff is empty, inline self-review recorded zero findings, and the mandatory restore command completed with the expected no-state result (Restored: False, no attempt edits existed).

Full report: ../try-fix-2/content.md

Aggregate Outcome

Two distinct candidates were generated in the required model order, but neither could be implemented or empirically evaluated because the try-fix baseline script requires a clean tracked worktree and unrelated harness changes were already present. No product files were changed, no test result is claimed, and both attempts completed their required artifact capture and restoration paths.


🏁 Report — Final Recommendation

✅ Final Recommendation: APPROVE

Winner

pr — the submitted fix

The raw PR is the only distinct candidate that is implemented, covered by the focused native Apple icon tests, and supported by a clean expert review. The expert found no actionable correctness, compatibility, item-propagation, or incremental-build defect. The trusted gate is inconclusive because its build/run could not complete; this is recorded as uncertainty rather than treated as a regression failure.

Candidate Comparison

Rank Candidate Implementation Focused regression evidence Expert assessment Result
1 pr Complete .icon bundle support in the submitted PR 10 focused tests recorded as passing; trusted gate inconclusive for build/environment reasons LGTM, medium confidence, no findings Winner
2 pr-plus-reviewer Identical to pr; reviewer recommended no changes No redundant rerun; inherits the same submitted code and evidence No reviewer delta Equivalent, not an improvement
3 try-fix-1 Planned manifest/dependency-driven invalidation, but no code was produced Not run; baseline guard blocked the attempt Empty diff and no substantive review target Blocked
4 try-fix-2 Planned atomic aggregate-state reconciliation, but no code was produced Not run; baseline guard blocked the attempt Empty diff and no substantive review target Blocked

No candidate failed a regression test. The two try-fix-* candidates rank below the implemented candidates because they were blocked before implementation and testing; their proposed designs therefore provide no executable evidence. pr-plus-reviewer does not outrank pr because its reviewer patch is empty and its behavior is exactly the submitted behavior.

Comparative Analysis

The submitted approach keeps native Apple icon handling scoped to Apple application targets and case-insensitive .icon MauiIcon items. It removes only those items from the ordinary Resizetizer path, recursively emits bundle children as ImageAsset, derives and validates AppIcon, reconciles the parsed legacy _XSAppIconAssets selection, carries project-reference items through the existing flow, and tracks path and content changes so ACTool cache invalidation covers additions, deletions, renames, edits, and switching back to an ordinary icon.

The focused tests exercise the material success and rejection paths, ordinary SVG behavior, project-reference propagation, and incremental invalidation. The expert review found the target ordering and downstream Apple SDK/ACTool integration coherent and found no reason to replace the per-child hash ledger with either unimplemented alternative. Because both alternatives stopped before producing a diff or test result, neither can displace a complete candidate that has focused passing evidence.

Uncertainty

The gate remains INCONCLUSIVE, not failed: its tests could not be built or run because of a build/environment error. This limits empirical confidence but does not identify a defect in the submitted fix, and the review contract explicitly requires judging the code on its merits rather than requesting changes solely for that gate outcome.


🧭 Next Steps — review latest findings

No alternative fix was selected for this run. Review the session findings and CI results before merging.

@MauiBot MauiBot added s/agent-approved AI agent recommends approval - PR fix is correct and optimal s/agent-fix-pr-picked AI could not beat the PR fix - PR is the best among all candidates s/agent-reviewed PR was reviewed by AI agent workflow (full 4-phase review) and removed s/agent-review-in-progress AI review is currently running for this PR labels Sep 28, 2026
@kubaflo
kubaflo merged commit 367cbc6 into net11.0 Sep 28, 2026
18 of 171 checks passed
@kubaflo
kubaflo deleted the jfversluis-native-apple-icon-support branch September 28, 2026 18:12
@github-actions github-actions Bot added this to the .NET 11.0-rc2 milestone Sep 28, 2026
kubaflo added a commit that referenced this pull request Sep 29, 2026
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

## Description

The Apple Icon Composer tests added in #38958 fail in public CI
independently of the SDK change in #38972:

- Disable MSBuild node reuse for the new native-icon unit tests,
matching the existing incremental Resizetizer tests. Windows keeps the
test project directory locked while disposing the temporary fixture when
MSBuild nodes remain alive.
- Read the app bundle manifest at its platform-specific path (iOS app
root or Mac Catalyst `Contents`) instead of recursively requiring only
one `Info.plist` across the app and its nested frameworks. The iOS
template-baseline assertion currently throws before exercising the new
icon.

This PR targets `net11.0` so the fix can flow into
`release/11.0.1xx-rc2` via the regular branch merge. It supersedes
#38983, whose RC2-based head was not suitable after that PR was
retargeted to `net11.0`. The SDK PR #38972 contains neither test change
in its diff.

## Validation

- `NativeAppleIconTargetsTests`: 10 passed locally on macOS.
`Microsoft.Maui.IntegrationTests.csproj` builds for `net11.0` with zero
warnings; formatting and whitespace checks pass.
- The original failures appear in public `maui-pr` runs
[1615515](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1615515)
and
[1615611](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1615611);
the macOS manifest failure also occurred in baseline #38971 [build
1615388](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1615388).
- The first run on this PR,
[1616042](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1616042),
passed both Windows Helix Resizetizer work items. Its Mac Catalyst icon
integration test got past the former manifest assertion and built the
native icon, but a subsequent no-op build timed out amid several other
30-minute template-build timeouts; the macOS job eventually exceeded its
240-minute agent limit.
- A **same-commit rerun**,
[1616449](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1616449),
confirms both `BuildsAppleIconComposerMauiIconIncrementally` cases
**passed**: iOS and Mac Catalyst in Azure test run
[44759776](https://dev.azure.com/dnceng-public/public/_TestManagement/Runs?runId=44759776&_a=runCharts).
The new Windows native-icon fixture did not fail. No further Apple-icon
code change or rerun is needed.
- **The full rerun is still red for independent failures:** Windows and
macOS `Build` integration each failed only
`WorkloadInstallPathsAreIndependentOfTrailingSeparator` because
`net11.0`'s `global.json` still requests old SDK `.103`, addressed by
#38951 and included in #38991. Its Windows Release Helix Resizetizer
work item failed
`SkiaSharpSvgToolsTests.Resize.BasicNoScaleReturnsOriginalSize` while
deleting a locked temporary file, not a `NativeAppleIconTargetsTests`
case. This PR intentionally does not change those unrelated tests.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 29, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

s/agent-approved AI agent recommends approval - PR fix is correct and optimal s/agent-fix-pr-picked AI could not beat the PR fix - PR is the best among all candidates s/agent-reviewed PR was reviewed by AI agent workflow (full 4-phase review)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants