When trying to use dotnet publish on a MAUI app to create a Mac OS Catalyst package, it apparently tries to include Esri.ArcGISRuntime.iOS.dll.o. This causes ld to fail with: "ld: can't open file, errno=1."
I've been able to reproduce this with my own project. I've also tried created a blank project using the ArcGIS MAUI template. The blank project can be debugged, but not published. I also tried publishing the ArcGIS .NET SDK Samples project. In every scenario, the same error is produced. I'm using publish in every scenario with an application setup in my Apple Developer account.
Searching the web and this forum hasn't been helpful so far.
This is my command line, with sensitive info removed:
dotnet publish -f net8.0-maccatalyst -c Release -p:MtouchLink=SdkOnly -p:CreatePackage=true -p:EnableCodeSigning=true -p:EnablePackageSigning=true -p:CodesignKey="Apple Development: First_Name Last_Name (redacted)" -p:CodesignProvision="AppName" -p:CodesignEntitlements="Platforms\MacCatalyst\Entitlements.plist" -p:PackageSigningKey="Developer ID Installer: First_Name Last_Name (redacted)" -p:UseHardenedRuntime=true
This is the output:
/usr/local/share/dotnet/packs/Microsoft.MacCatalyst.Sdk/17.2.8053/targets/Xamarin.Shared.Sdk.targets(1560,3): error : clang++ exited with code 1: [/samples/arcgis-maps-sdk-dotnet-samples/src/MAUI/Maui.Samples/ArcGIS.Samples.Maui.csproj::TargetFramework=net8.0-maccatalyst]
/usr/local/share/dotnet/packs/Microsoft.MacCatalyst.Sdk/17.2.8053/targets/Xamarin.Shared.Sdk.targets(1560,3): error : ld: can't open file, errno=1 file '/samples/arcgis-maps-sdk-dotnet-samples/src/MAUI/Maui.Samples/obj/Release/net8.0-maccatalyst/maccatalyst-arm64/nativelibraries/aot-output/arm64/Esri.ArcGISRuntime.iOS.dll.o' [/samples/arcgis-maps-sdk-dotnet-samples/src/MAUI/Maui.Samples/ArcGIS.Samples.Maui.csproj::TargetFramework=net8.0-maccatalyst]
/usr/local/share/dotnet/packs/Microsoft.MacCatalyst.Sdk/17.2.8053/targets/Xamarin.Shared.Sdk.targets(1560,3): error : clang: error: linker command failed with exit code 1 (use -v to see invocation) [/samples/arcgis-maps-sdk-dotnet-samples/src/MAUI/Maui.Samples/ArcGIS.Samples.Maui.csproj::TargetFramework=net8.0-maccatalyst]