Skip to content

fix(sdk): Stop compiling leftover Platforms/MacCatalyst and MacOS folders - #25832

Merged
ramezgerges merged 2 commits into
unoplatform:masterfrom
ramezgerges:dev/rara/sdk-ignore-maccatalyst
Nov 2, 2026
Merged

ramezgerges merged 2 commits into
unoplatform:masterfrom
ramezgerges:dev/rara/sdk-ignore-maccatalyst

Conversation

@ramezgerges

@ramezgerges ramezgerges commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

GitHub Issue: closes #24870, closes unoplatform/uno-private#2458

PR Type:

🐞 Bugfix

What changed? 🚀

Removing Mac Catalyst in 7.0 (#23772) also dropped its folder from the platform ignore list in Uno.Common.targets, and the native macOS head's Platforms/MacOS/ folder had already been dropped from it before 6.7. Folders left over from older templates therefore compiled into every head except desktop, and failed on UIKit or AppKit:

Platforms/MacCatalyst/Main.maccatalyst.cs(1,7): error CS0246: The type or namespace name 'UIKit' could not be found [TargetFramework=net10.0-browserwasm]

Fix (src/Uno.Sdk/targets/Uno.Common.targets)

  • Platforms/MacCatalyst/ and Platforms/MacOS/ (or root-level MacCatalyst/ / MacOS/, which 6.5 also handled) are left out of every target framework again, through the same _IgnorePlatformFiles item as the other platform folders. Their files become None items. Uno.Sdk 6.5 excluded both; 6.7 had already dropped MacOS (8d0ad809d0), and 7.0 dropped MacCatalyst.
  • When either folder exists, the build warns with UNOB0033: the platform was removed, macOS is served by the desktop target, so move what's still needed to Platforms/Desktop and delete the folder.

Docs

  • uno-build-error-codes.md: new UNOB0033 entry.
  • migrating-to-uno-7.md: the "Mac Catalyst is removed" section said the folder "is no longer picked up"; it now says it is not built and links UNOB0033.

Validation, with the issue's repro project, against the published Uno.Sdk 7.0.0-dev.113 and the same SDK with only this Uno.Common.targets swapped in (dev.113's copy is identical to master's):

dev.113 dev.113 + this PR
MacCatalyst file in Compile, net10.0-browserwasm yes no
MacCatalyst file in Compile, net10.0-android yes no
MacCatalyst file in Compile, net10.0-desktop no no
Platforms/Android/Main.cs in Compile on android (control) yes yes
dotnet build -f net10.0-browserwasm fails with CS0246 'UIKit' succeeds with the UNOB0033 warning

The same check with both a Platforms/MacCatalyst/ (using UIKit) and a Platforms/MacOS/ (using AppKit) folder: dev.113 compiles both into browserwasm and android and fails with CS0246 on UIKit and AppKit; with this PR neither is in Compile, the build succeeds, and UNOB0033 is reported once per folder.

The Android, iOS and Windows heads weren't built (the Android result above is from evaluation). markdownlint and cspell (CI versions) pass on both docs.

Note: https://aka.platform.uno/UNOB0033 follows the existing pattern; I couldn't tell from outside whether new codes need an entry in the short-link service.

Related but separate: #24500 (a net*-maccatalyst TFM is accepted silently).

PR Checklist ✅

🤖 Generated with Claude Code

Removing Mac Catalyst in 7.0 also dropped the folder from the platform
ignore list, so a Platforms/MacCatalyst folder from a pre-7.0 template
compiled into every head but desktop and failed on UIKit. The Uno.Sdk
leaves it out of every target framework again, as 6.x did for non-Catalyst
heads, and warns with UNOB0033 to move what's needed to Platforms/Desktop.

Fixes unoplatform#24870

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@unodevops

Copy link
Copy Markdown
Contributor

@unodevops

Copy link
Copy Markdown
Contributor

🤖 Your WebAssembly Sample App stage site is ready! Visit it here:

@unodevops

Copy link
Copy Markdown
Contributor

⚠️⚠️ The build 242304 has failed on Uno.UI - CI.

@ramezgerges

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 2 pipeline(s).

@unodevops

Copy link
Copy Markdown
Contributor

@unodevops

Copy link
Copy Markdown
Contributor

🤖 Your WebAssembly Sample App stage site is ready! Visit it here:

@unodevops

Copy link
Copy Markdown
Contributor

⚠️⚠️ The build 242345 has failed on Uno.UI - CI.

Uno.Sdk 6.5 also kept Platforms/MacOS (the native macOS head's folder)
out of every other head; 6.7 dropped that, so projects upgraded from
older templates compile it into every head and fail on AppKit. It gets
the same treatment as Platforms/MacCatalyst, including UNOB0033.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@ramezgerges ramezgerges changed the title fix(sdk): Stop compiling a leftover Platforms/MacCatalyst folder fix(sdk): Stop compiling leftover Platforms/MacCatalyst and MacOS folders Oct 30, 2026
@unodevops

Copy link
Copy Markdown
Contributor

@unodevops

Copy link
Copy Markdown
Contributor

🤖 Your WebAssembly Sample App stage site is ready! Visit it here:

@mergify

mergify Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again.

@ramezgerges
ramezgerges merged commit f1c29a7 into unoplatform:master Nov 2, 2026
53 checks passed
@ramezgerges
ramezgerges deleted the dev/rara/sdk-ignore-maccatalyst branch November 2, 2026 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Uno.Sdk 7.0 compiles a leftover Platforms/MacCatalyst folder into every head except Desktop

3 participants