dotnet / dotnet/maui

.NET MAUI iOS Native Linker Failure on .NET 9 + Xcode 26.5

Open
#35,658 4 comments 1 reaction 0 assignees View on GitHub
area-setup platform/ios s/needs-repro t/bug
Dominant language
C#
Stars
23.3k
Forks
2k
Avg merge
1d 15h
Merged PRs (30d)
290

Description

### Description

Environment
macOS: 26.x
Xcode: 26.5
.NET SDK: 9.0.300
Workload:
maui 9.0.120/9.0.100
Microsoft.iOS.Sdk.net9.0_26.5
Architecture: Apple Silicon (arm64)
Project Type

.NET MAUI iOS application targeting:

net9.0-ios
Command Used
dotnet build -t:Run \
-f net9.0-ios \
-c Debug \
-p:RuntimeIdentifier=iossimulator-arm64 \
-p:_DeviceName=:v2:udid=65631268-BF2E-4C34-A623-8D89F2C2A372
Simulator
xcrun simctl list devices

Simulator runtime available:

iOS 26.5
iPhone 17 / iPhone 17 Pro / iPhone 17 Pro Max
Issue

Build fails during native iOS linking stage with unresolved Xamarin/iOS symbols.

Error:

clang++ exited with code 1:
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_XamarinSwiftFunctions", referenced from:

"_xamarin_retainWeakReference_trampoline", referenced from:
-[PassKit_PKDisbursementVoucher retainWeakReference] in Microsoft.iOS.registrar.a
-[MessageUI_Mono_MFMailComposeViewControllerDelegate retainWeakReference] in Microsoft.iOS.registrar.a
...

"_xamarin_simd__NVector16b_objc_msgSend"
"_xamarin_simd__NVector3d_objc_msgSend"
"_xamarin_simd__NativeHandle_objc_msgSendSuper_NativeHandle_Vector2"
What I Already Tried
Clean caches
rm -rf bin
rm -rf obj
rm -rf ~/Library/Caches/Xamarin
rm -rf ~/Library/Developer/Xcode/DerivedData
Repair workloads
dotnet workload repair
Reinstall workloads
dotnet workload install ios maui-ios
Disable linker

Added:

None

Still fails.

Expected Behavior

Project should build and launch successfully on iOS simulator.

Actual Behavior

Native linker fails with unresolved Xamarin runtime symbols during simulator build.

Additional Notes
Issue started after upgrading Xcode/iOS SDK.
Simulator runtimes are installed correctly.
Build reaches final native linker stage before failing.
Warnings are mostly nullable/obsolete API warnings and do not appear related.
Possible regression or compatibility issue between:
.NET 9 iOS workload
Xcode 26.5
native Swift/Xamarin runtime linkage

### Steps to Reproduce

_No response_

### Link to public reproduction project repository

_No response_

### Version with bug

9.0.100 SR10

### Is this a regression from previous behavior?

No, this is something new

### Last version that worked well

9.0.0-preview.1.9973

### Affected platforms

iOS

### Affected platform versions

_No response_

### Did you find any workaround?

_No response_

### Relevant log output

```shell

```

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the provided dotnet build -t:Run command for net9.0-ios with the ios simulator runtime, then inspect the native linker output for the listed unresolved Xamarin symbols. Compare the .NET 9 iOS workload and Xcode 26.5 linkage behavior, including the attempted workload repair and linker-disabled configuration. Done means the application builds and launches successfully on the iOS simulator.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, ios
Domain
build-system, mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.