Skip to content

Adding Mac Catalyst target to the MacOS build #168

@torfluor

Description

@torfluor

When I'm trying to use the MacOS NuGet package with a .NET MAUI Catalyst project the dll is not found. I get the following error:

Exception has occurred: CLR/System.Reflection.TargetInvocationException
An unhandled exception of type 'System.Reflection.TargetInvocationException' occurred in Microsoft.MacCatalyst.dll: 'Exception has been thrown by the target of an invocation.'
 Inner exceptions found, see $exception in variables window for more details.
 Innermost exception 	 System.DllNotFoundException : pdfium

I also tried to use the iOS NuGet package, but I get the following compile error:

/usr/local/share/dotnet/packs/Microsoft.MacCatalyst.Sdk/17.2.8053/targets/Xamarin.Shared.Sdk.targets(1560,3): error : ld: building for Mac Catalyst, but linking in dylib built for iOS, file 'obj/Debug/net8.0-maccatalyst/maccatalyst-arm64/nativelibraries/Contents/MonoBundle/libpdfium.dylib' [/Users/tor/dev/MauiPdfiumTest/MauiPdfiumTest/MauiPdfiumTest.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) [/Users/tor/dev/MauiPdfiumTest/MauiPdfiumTest/MauiPdfiumTest.csproj::TargetFramework=net8.0-maccatalyst]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions