xamarin-macios
xamarin-macios copied to clipboard
Consider default `$(RuntimeIdentifier)` for MacCatalyst apps?
Steps to Reproduce
dotnet new maccatalystdotnet buildordotnet build -c Release
Even on an M1, I get a maccatalyst-x64 app.
Expected Behavior
I'm thinking it should do:
Debug- pick the RID on the machine you're building with. So an M1 gets amaccatalyst-arm64and Intel getsmaccatalyst-x64, and this would help the developer loop? No Rosetta when your app launches for debugging/development?Release- defaults toRuntimeIdentifiers=maccatalyst-x64;maccatalyst-arm64soReleasebuilds get an app that supports both by default.
Users can override these defaults in their .csproj.
Actual Behavior
It seems like it just defaults to maccatalyst-x64? Always?
Environment
I was testing with the latest .NET 6 builds.
This seems like a good idea, adding to NET7 for consideration.
FYI @dalexsoto @rolfbjarne
This might also apply to net6.0-macos apps, but I didn't try one of those. I was testing MacCatalyst for a customer's MAUI app.
This might also apply to net6.0-macos apps,
Yes, I can confirm that this is the behaviour for net6.0-macos too.
IIRC @rolfbjarne wanted to ensure consistent output whatever the arch of the bots that build the app. The same logic would also apply to Catalyst apps.
For now (maybe for .NET 7), I would consider just changing the default for Release builds and leave Debug builds as-is.
I agree, I'll make Release builds default to be universal (for both macOS and Mac Catalyst).
This is fixed now.