xamarin / xamarin-macios

.NET for iOS, Mac Catalyst, macOS, and tvOS provide open-source bindings of the Apple SDKs for use with .NET managed languages such as C#
Other
2.47k stars 514 forks source link

Missing `SchemeName` key/value pair in `Info.plist` of xcarchive #13995

Open lauxjpn opened 2 years ago

lauxjpn commented 2 years ago

Steps to Reproduce

I am running the following command with the -p:ArchiveOnBuild=true parameter:

dotnet publish "ProjectName.csproj" -c Release -p:ArchiveOnBuild=true -p:DisableAppCenter=true -p:ServerAddress=192.168.0.3 -p:ServerUser=username -bl -v n

Expected Behavior

The Info.plist file of the generated xcarchive contains a valid SchemeName key/value pair.

Actual Behavior

The Archive tasks currently does not set the SchemeName key/value in the Info.plist of the xcarchive. This leads to the app being shown in the top left ComboBox of the Xcode Organizer as Unknown scheme, since it shows the SchemeName of the newest archive. The default value of the SchemeName key should be overridable using a property in your project file.

Environment

Using iOS workload 15.2.100-preview.12.5 and .NET 6.0.200-preview.22053.5 on both machines. I had the same issue with 15.0.101-preview.11.551 previously as well.

.NET SDK (reflecting any global.json):
 Version:   6.0.200-preview.22053.5
 Commit:    118f8629ac

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.19043
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\PathToSolution\.dotnet\sdk\6.0.200-preview.22053.5\

Host (useful for support):
  Version: 6.0.1
  Commit:  3a25a7f1cc

.NET SDKs installed:
  3.1.201 [C:\Program Files\dotnet\sdk]
  3.1.416 [C:\Program Files\dotnet\sdk]
  5.0.303 [C:\Program Files\dotnet\sdk]
  5.0.404 [C:\Program Files\dotnet\sdk]
  6.0.100 [C:\Program Files\dotnet\sdk]
  6.0.101 [C:\Program Files\dotnet\sdk]
  6.0.200-preview.22053.5 [C:\PathToSolution\.dotnet\sdk]
chamons commented 2 years ago

Not sure if this is a bug or feature, but the dotnet publish is relatively new code.