xamarin-macios icon indicating copy to clipboard operation
xamarin-macios copied to clipboard

Consider default `$(RuntimeIdentifier)` for MacCatalyst apps?

Open jonathanpeppers opened this issue 3 years ago • 3 comments

Steps to Reproduce

  1. dotnet new maccatalyst
  2. dotnet build or dotnet build -c Release

Even on an M1, I get a maccatalyst-x64 app.

Expected Behavior

I'm thinking it should do:

  1. Debug - pick the RID on the machine you're building with. So an M1 gets a maccatalyst-arm64 and Intel gets maccatalyst-x64, and this would help the developer loop? No Rosetta when your app launches for debugging/development?
  2. Release - defaults to RuntimeIdentifiers=maccatalyst-x64;maccatalyst-arm64 so Release builds 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.

jonathanpeppers avatar Aug 03 '22 16:08 jonathanpeppers

This seems like a good idea, adding to NET7 for consideration.

FYI @dalexsoto @rolfbjarne

chamons avatar Aug 04 '22 13:08 chamons

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.

jonathanpeppers avatar Aug 04 '22 13:08 jonathanpeppers

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.

spouliot avatar Aug 04 '22 14:08 spouliot

For now (maybe for .NET 7), I would consider just changing the default for Release builds and leave Debug builds as-is.

jonathanpeppers avatar Aug 18 '22 19:08 jonathanpeppers

I agree, I'll make Release builds default to be universal (for both macOS and Mac Catalyst).

rolfbjarne avatar Aug 25 '22 11:08 rolfbjarne

This is fixed now.

rolfbjarne avatar Aug 31 '22 14:08 rolfbjarne