File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
src/SourceGenerators/Uno.UI.SourceGenerators/XamlGenerator Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -403,6 +403,26 @@ private SourceText InnerGenerateFile()
403403 BuildXBindTryGetDeclarations ( writer ) ;
404404 }
405405 }
406+
407+ if ( _isHotReloadEnabled && Generation . IOSViewSymbol . Value is not null )
408+ {
409+ // Workaround for HR behaving incorrectly on iOS
410+ // https://github.com/xamarin/xamarin-macios/issues/22102
411+
412+ using ( writer . BlockInvariant ( $ "namespace __internal") )
413+ {
414+ writer . AppendLineIndented ( "/// <remarks>Internal Use for iOS only.</remarks>" ) ;
415+ writer . AppendLineIndented ( "[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]" ) ;
416+ writer . AppendLineIndented ( "[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]" ) ;
417+ using ( writer . BlockInvariant ( $ "static partial class __{ _xClassName . ClassName } _Dummy") )
418+ {
419+ using ( writer . BlockInvariant ( "private static class Dummy_Bindings" ) )
420+ {
421+ writer . AppendLineIndented ( "private static object Owner { get; set; }" ) ;
422+ }
423+ }
424+ }
425+ }
406426 }
407427 }
408428
You can’t perform that action at this time.
0 commit comments