fix(hr): Fix HR not working on iOS#22083
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes Hot Reload (HR) functionality on iOS by disabling the linker/trimmer when the RemoteControl package is referenced. The trimmer was removing HR messages and reflection metadata required for Hot Reload to function properly. The fix adds MSBuild logic to automatically set linker modes to 'None' for iOS and Android, with warning messages if developers manually override these settings.
Key Changes
- Adds
<Choose>block to automatically disable linking on iOS (MTouchLink=None) and Android (AndroidLinkMode=None) when not already set - Adds warning targets that alert developers if linking is manually enabled, as it breaks Hot Reload functionality
- Both changes are conditionally applied only when targeting iOS or Android platforms
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-22083/docs/index.html |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-22083/docs/index.html |
|
@Mergifyio backport release/stable/6.4 |
✅ Backports have been createdDetails
|
…6.4/pr-22083 fix(hr): Fix HR not working on iOS (backport #22083)
linked #21857
🐞 Bugfix
Fix HR not working on iOS
What is the current behavior? 🤔
What is the new behavior? 🚀
Trimmer/linker disabled when RemoteControl package is referenced.
PR Checklist ✅
Screenshots Compare Test Runresults.Other information ℹ️
There is still an issue where HR is not working with debugger attached with VSCode: https://github.com/unoplatform/uno.vscode/issues/1226