Skip to content

"Delegate Event handler" on native objects aren't invoked #24262

@tipa

Description

@tipa

Apple platform

iOS & macOS

Framework version

net10.0-*

Affected platform version

.NET 10 - Xcode 26.1

Description

After updating to .NET10 GA and the Xcode 26.1 workload, some event handlers that forward Delegate events aren't invoked any more. The problem did not happen on .NET10 RC2 with Xcode 26.0.

I noticed this on iOS for UIDocumentPickerViewController and on macOS for NSTextField, but more classes might be affected

Steps to Reproduce

var picker = new UIDocumentPickerViewController([UTTypes.Zip], true);
picker.WasCancelled += (_, _) => System.Diagnostics.Debugger.Break();
picker.DidPickDocumentAtUrls += (_, _) => System.Diagnostics.Debugger.Break();
vc.PresentViewController(picker, true, null);
var field = new NSTextField();
field.Changed += (_, _) => System.Diagnostics.Debugger.Break();

NOTE: The problem does not happen when debugging a macOS app or an iOS app on the simulator.
However, the problem does happen when the macOS app has been built in Release mode or the iOS app runs on a physical device.

Did you find any workaround?

When setting the delegate myself and implementing the delegate method, this works as expected

Metadata

Metadata

Assignees

Labels

bugIf an issue is a bug or a pull request a bug fixregressionThe issue or pull request is a regression

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions