Skip to content

Conversation

@spouliot
Copy link
Contributor

@spouliot spouliot commented Nov 4, 2025

Note This is a copy of (already reviewed)
#21262 which was not merged (even if Github says it was).

PR Type:

  • 📚 Documentation content changes

What is the current behavior? 🤔

Published app bundles (for macOS) are arch-specific, either x64 or arm64.

What is the new behavior? 🚀

macOS' app bundles can be published as fat bundles by merging both x64 and arm64 bundles.

PR Checklist ✅

Please check if your PR fulfills the following requirements:

Other information ℹ️

Before this PR is merged a new revision of uno.sdk.extras must be used for the Uno.Sdk, c.c. @agneszitte

Copilot AI review requested due to automatic review settings November 4, 2025 14:53
@spouliot spouliot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 4, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR documents new features for creating and managing fat (universal) macOS app bundles that support both Intel (x64) and Apple Silicon (arm64) architectures. It also removes redundant -p:SelfContained=true parameters from documentation examples, as app bundles are always self-contained by default starting with Uno 6.1.

  • Adds documentation for creating fat app bundles using UnoPublishFatBundle target
  • Documents individual MSBuild tasks for re-signing, packaging, creating disk images, and notarizing app bundles
  • Removes redundant -p:SelfContained=true parameters throughout both documentation files

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.

File Description
doc/articles/uno-publishing-desktop-macos.md Adds fat app bundle creation section, removes redundant SelfContained property, adds troubleshooting for CodeResources warning
doc/articles/uno-publishing-desktop-macos-advanced.md Adds platform removal optimization section, documents individual MSBuild tasks for app bundle management, removes redundant SelfContained property
Comments suppressed due to low confidence (1)

doc/articles/uno-publishing-desktop-macos.md:1

  • Grammatical error: 'with and additional' should be 'with an additional'.
---

To create a fat app bundle that can run on both Intel and Apple Silicon Macs you simply need to use this command:

```bash
dotnet build project.csproj -t:UnoPublishFatBundle -p:_IsPublishing=true -f:net9.0-desktop
Copy link

Copilot AI Nov 4, 2025

Choose a reason for hiding this comment

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

Incorrect syntax for the -f parameter. It should use -f (single dash) not -f: (with colon).

Suggested change
dotnet build project.csproj -t:UnoPublishFatBundle -p:_IsPublishing=true -f:net9.0-desktop
dotnet build project.csproj -t:UnoPublishFatBundle -p:_IsPublishing=true -f net9.0-desktop

Copilot uses AI. Check for mistakes.
Finally, merge both arch-specific app bundles into a fat (multi-arch) app bundle.

```bash
dotnet build project.csproj -t:UnoMergeBundles -p:_IsPublishing=true -restore:false -f:net9.0-desktop -p:UnoX64Bundle=bin/Release/net9.0-desktop/osx-x64/publish/UnoApp.app -p:UnoArm64Bundle=bin/Release/net9.0-desktop/osx-arm64/publish/UnoApp.app -p:UnoFatBundle=UnoApp.app
Copy link

Copilot AI Nov 4, 2025

Choose a reason for hiding this comment

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

Inconsistent parameter syntax. The -restore:false and -f:net9.0-desktop parameters use colons, but standard .NET CLI syntax uses equals signs for properties (-restore:false should be --no-restore or -p:Restore=false) and single dashes without colons for framework (-f net9.0-desktop).

Copilot uses AI. Check for mistakes.
Most changes done to an app bundle will break the digital signature, if present. If you need to customize the app bundle after it has been created, you will need to re-sign it using this command:

```bash
dotnet build project.csproj -t:UnoSignAppBundle -p:_IsPublishing=true -restore:false -f:net9.0-desktop -p:AppBundlePath=UnoApp.app -p:CodesignKey={{identity}}
Copy link

Copilot AI Nov 4, 2025

Choose a reason for hiding this comment

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

Inconsistent parameter syntax. The -restore:false and -f:net9.0-desktop parameters use colons, but standard .NET CLI syntax uses --no-restore for the restore option and -f net9.0-desktop (without colon) for the framework parameter.

Copilot uses AI. Check for mistakes.
If you did not create a package (.pkg) while building the app bundle, you can create one using the following command:

```bash
dotnet build project.csproj -t:UnoPackageAppBundle -p:_IsPublishing=true -restore:false -f:net9.0-desktop -p:AppBundlePath=UnoApp.app
Copy link

Copilot AI Nov 4, 2025

Choose a reason for hiding this comment

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

Inconsistent parameter syntax. The -restore:false and -f:net9.0-desktop parameters use colons, but standard .NET CLI syntax uses --no-restore for the restore option and -f net9.0-desktop (without colon) for the framework parameter.

Copilot uses AI. Check for mistakes.
If you did not create a disk image (.dmg) while building the app bundle, you can create one using the following command:

```bash
dotnet build project.csproj -t:UnoCreateDiskImage -p:_IsPublishing=true -restore:false -f:net9.0-desktop -p:AppBundlePath=UnoApp.app
Copy link

Copilot AI Nov 4, 2025

Choose a reason for hiding this comment

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

Inconsistent parameter syntax. The -restore:false and -f:net9.0-desktop parameters use colons, but standard .NET CLI syntax uses --no-restore for the restore option and -f net9.0-desktop (without colon) for the framework parameter.

Copilot uses AI. Check for mistakes.
It's possible to notarize an app bundle, package or disk image after it has been created. This is useful for fat app bundles, which require an extra merge step, as well as allowing further customization (that would break a digital signature) after an app bundle is created.

```bash
dotnet build project.csproj -t:UnoNotarize -p:_IsPublishing=true -restore:false -f:net9.0-desktop -p:InputFilePath={{file-to-notarize}} -p:PackageFormat={{file-format}} ...
Copy link

Copilot AI Nov 4, 2025

Choose a reason for hiding this comment

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

Inconsistent parameter syntax. The -restore:false and -f:net9.0-desktop parameters use colons, but standard .NET CLI syntax uses --no-restore for the restore option and -f net9.0-desktop (without colon) for the framework parameter.

Copilot uses AI. Check for mistakes.
@unodevops
Copy link
Contributor

🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-21744/docs/index.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants