Skip to content

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

Open

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)

Activity

  1. changed the title [-]BarcodeScanner with .NET 10 and Xcode 26.2[/-] [+]BarcodeScanner with .NET 10 and Xcode 26.2 (ERROR)[/+] on Apr 2, 2026
  2. eXeShnik commented on Oct 16, 2026

    @eXeShnik

    You need to add some packages manually

    <ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">
            <PackageReference Include="AdamE.MLKit.iOS.BarcodeScanning" Version="6.0.0.3" />
            <PackageReference Include="AdamE.MLKit.iOS.Core" Version="12.0.0.3" />
            <PackageReference Include="AdamE.Google.iOS.GoogleUtilities" Version="8.1.0.3" />
        </ItemGroup>
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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