Select to view content in your preferred language

Publishing MAUI Catalyst app tries to include /Esri.ArcGISRuntime.iOS.dll.o

273
2
Jump to solution
05-20-2024 11:12 AM
Labels (1)
BobWintemberg
New Contributor

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]

0 Kudos
1 Solution

Accepted Solutions
dotMorten_esri
Esri Notable Contributor

The iOS DLL is correct (it’s the same for iOS and catalyst).

this looks more like an issue with xamarin and the linker. Is Xcode, Maui workloads and maps Sdk all up to date?

View solution in original post

0 Kudos
2 Replies
dotMorten_esri
Esri Notable Contributor

The iOS DLL is correct (it’s the same for iOS and catalyst).

this looks more like an issue with xamarin and the linker. Is Xcode, Maui workloads and maps Sdk all up to date?

0 Kudos
BobWintemberg
New Contributor

Thank you, I went ahead and updated all of those items just in case.

Once you mentioned that the iOS DLL is correct, I did some investigating of my build output. I opened the output directory and saw everything but the .o file. I manually ran the clang invocation and noticed the file was built but then disappeared from the directory immediately. Come to find out, my virus software thinks this binary is iOS malware. I'm going to exclude my project for now to fix this. The virus scanner notification disappeared so quickly that I didn't notice. It thinks the binary is Gen:Variant.Application.IOS.ZergHelperCA.1.