Publish an unsigned .NET MAUI Mac Catalyst app
To publish an unsigned .NET Multi-platform App UI (.NET MAUI) Mac Catalyst app, open a terminal and navigate to the folder for your app project. Run the dotnet publish
command, providing the following parameters:
Parameter | Value |
---|---|
-f or --framework |
The target framework, which is net8.0-maccatalyst . |
-c or --configuration |
The build configuration, which is Release . |
-p:MtouchLink |
The link mode for the project, which can be None , SdkOnly , or Full . |
-p:CreatePackage |
An optional parameter that controls whether to create an .app or a .pkg. Use false for an .app. |
Warning
Attempting to publish a .NET MAUI solution will result in the dotnet publish
command attempting to publish each project in the solution individually, which can cause issues when you've added other project types to your solution. Therefore, the dotnet publish
command should be scoped to your .NET MAUI app project.
Additional build parameters can be specified on the command line. The following table lists some of the common parameters:
Parameter | Value |
---|---|
-p:ApplicationTitle |
The user-visible name for the app. |
-p:ApplicationId |
The unique identifier for the app, such as com.companyname.mymauiapp . |
-p:ApplicationVersion |
The version of the build that identifies an iteration of the app. |
-p:ApplicationDisplayVersion |
The version number of the app. |
-p:RuntimeIdentifier |
The runtime identifier (RID) for the project. Release builds of .NET MAUI Mac Catalyst apps default to using maccatalyst-x64 and maccatalyst-arm64 as runtime identifiers, to support universal apps. To support only a single architecture, specify maccatalyst-x64 or maccatalyst-arm64 . |
For example, use the following command to create an .app:
dotnet publish -f net8.0-maccatalyst -c Release -p:CreatePackage=false
Note
In .NET 8, the dotnet publish
command defaults to the Release
configuration. Therefore, the build configuration can be omitted from the command line.
Use the following command to create a .pkg:
dotnet publish -f net8.0-maccatalyst -c Release
Publishing builds the app, and then copies the .app to the bin/Release/net8.0-maccatalyst/ folder or the .pkg to the bin/Release/net8.0-maccatalyst/publish/ folder. If you publish the app using only a single architecture, the .app will be published to the bin/Release/net8.0-maccatalyst/{architecture}/ folder while the .pkg will be published to the bin/Release/net8.0-maccatalyst/{architecture}/publish/ folder.
For more information about the dotnet publish
command, see dotnet publish.
Run the unsigned app
By default, .app and .pkg files that are downloaded from the internet can't be run by double-clicking on them. For more information, see Open a Mac app from an unidentified developer on support.apple.com.
To ensure that a .pkg installs the app to your Applications folder, copy the .pkg to outside of your build artifacts folder and delete the bin and obj folders before double-clicking on the .pkg.