Skip to content

BarcodeScanner with .NET 10 and Xcode 26.2 (ERROR) #277

@MiguelPiresP

Description

@MiguelPiresP

I use BarcodeScanner.Mobile.Maui in my .NET MAUI project. I was using .NET version 9.0 and decided to update to the .NET 10 version of the framework, and after updating and trying to run it on an iOS device, I started receiving the following error:

Image

It appears to me that BarcodeScanner.Maui uses the native MLKit library on iOS, but it's not correctly linking the dependencies for .NET 10+ Xcode 26.2+.

Output:

[...]

1>C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk.net10.0_26.2\26.2.10217\targets\Xamarin.Shared.Sdk.targets(1868,3): error : clang++ exited with code 1:
1>C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk.net10.0_26.2\26.2.10217\targets\Xamarin.Shared.Sdk.targets(1868,3): error : Undefined symbols for architecture arm64:
1>C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk.net10.0_26.2\26.2.10217\targets\Xamarin.Shared.Sdk.targets(1868,3): error : "_GULOSLogBasic", referenced from:
1>C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk.net10.0_26.2\26.2.10217\targets\Xamarin.Shared.Sdk.targets(1868,3): error : _MLKLog in MLKitCommon[arm64]7
1>C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk.net10.0_26.2\26.2.10217\targets\Xamarin.Shared.Sdk.targets(1868,3): error : "_GULOSLogError", referenced from:
1>C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk.net10.0_26.2\26.2.10217\targets\Xamarin.Shared.Sdk.targets(1868,3): error : -[GULCCComponentContainer populateComponentsFromRegisteredClasses:withContext:] in MLKitCommon[arm64]212
1>C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk.net10.0_26.2\26.2.10217\targets\Xamarin.Shared.Sdk.targets(1868,3): error : -[GULCCComponentContainer instantiateInstanceForProtocol:withBlock:] in MLKitCommon[arm64]212
1>C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk.net10.0_26.2\26.2.10217\targets\Xamarin.Shared.Sdk.targets(1868,3): error : "OBJC_CLASS$_GULUserDefaults", referenced from:
1>C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk.net10.0_26.2\26.2.10217\targets\Xamarin.Shared.Sdk.targets(1868,3): error : in MLKitCommon[arm64]2
1>C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk.net10.0_26.2\26.2.10217\targets\Xamarin.Shared.Sdk.targets(1868,3): error : ld: symbol(s) not found for architecture arm64
1>C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk.net10.0_26.2\26.2.10217\targets\Xamarin.Shared.Sdk.targets(1868,3): error : clang++: error: linker command failed with exit code 1 (use -v to see invocation)

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions