refactor: Remove legacy macOS references#22650
Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors the codebase to remove legacy native macOS/XAML prefixes and updates build targeting so *.iOSmacOS.cs sources are only included for iOS/Mac Catalyst, while also adding/reshaping several iOS(/Apple UIKit) implementations (notably WebView2 WebResourceRequested plumbing and iOS MIDI ports/providers).
Changes:
- Remove
macosXAML prefixes/styles and update documentation to reflect macOS support via Skia (not a native macOS UI target). - Adjust cross-targeting so
*.iOSmacOS.cscompiles only for iOS/Mac Catalyst. - Add new iOS implementations for WebAuthenticationBroker, MIDI, Geolocation, and WebView2 native bridging pieces.
Reviewed changes
Copilot reviewed 17 out of 35 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/Uno.UWP/Security/Authentication/Web/WebAuthenticationBrokerProvider.iOS.cs | Adds iOS provider implementation for WebAuthenticationBroker. |
| src/Uno.UWP/Devices/Midi/MidiOutPort.iOS.cs | Adds CoreMidi-based MIDI out port implementation. |
| src/Uno.UWP/Devices/Midi/MidiInPort.iOS.cs | Adds CoreMidi-based MIDI in port implementation. |
| src/Uno.UWP/Devices/Geolocation/Geolocator.iOS.cs | Adds iOS implementation for Geolocator and access request flow. |
| src/Uno.UWP/Devices/Enumeration/Internal/Providers/Midi/MidiOutDeviceClassProvider.iOS.cs | Adds iOS provider wrapper for MIDI-out device enumeration. |
| src/Uno.UWP/Devices/Enumeration/Internal/Providers/Midi/MidiInDeviceClassProvider.iOS.cs | Adds iOS provider wrapper for MIDI-in device enumeration. |
| src/Uno.UWP/Devices/Enumeration/Internal/Providers/Midi/MidiDeviceClassProviderBase.iOS.cs | Adds CoreMidi-backed device enumeration/watch base for iOS. |
| src/Uno.UI/UI/Xaml/Style/Generic/SystemResources.xaml | Removes macos namespace usage for shared resources. |
| src/Uno.UI/UI/Xaml/Style/Generic/Generic.xaml | Removes macOS-specific XAML style branches and namespace. |
| src/Uno.UI/UI/Xaml/Style/Generic/Generic.Native.xaml | Removes macOS-native style keys/branches. |
| src/Uno.UI/UI/Xaml/DragDrop/DragView.xaml | Removes macos namespace/ignorable prefix. |
| src/Uno.UI/UI/Xaml/Controls/WebView/Native/iOSmacOS/WebViewNavigationDelegate.iOS.cs | Introduces WKNavigationDelegate implementation for Apple UIKit WebView wrapper. |
| src/Uno.UI/UI/Xaml/Controls/WebView/Native/iOSmacOS/UnoWKWebView.iOS.cs | Updates navigation-finished behavior (injector conditional adjusted). |
| src/Uno.UI/UI/Xaml/Controls/WebView/Native/iOSmacOS/UnoWKWebView.WebResourceRequested.iOS.cs | Adds WebResourceRequested filter/event support via request tracking + JS interceptor. |
| src/Uno.UI/UI/Xaml/Controls/WebView/Native/iOSmacOS/UnoWKWebView.ErrorMap.iOS.cs | Adds NSUrlError → CoreWebView2WebErrorStatus mapping table. |
| src/Uno.UI/UI/Xaml/Controls/WebView/Native/iOSmacOS/NativeWebView.iOS.cs | Defines NativeWebView type for templates on Apple UIKit. |
| src/Uno.UI/UI/Xaml/Controls/WebView/Native/iOSmacOS/NativeCoreWebView2WebResourceResponse.iOS.cs | Adds native response wrapper for WebResourceRequested APIs. |
| src/Uno.UI/UI/Xaml/Controls/WebView/Native/iOSmacOS/NativeCoreWebView2WebResourceRequestedEventArgs.iOS.cs | Adds native event args wrapper for WebResourceRequested APIs. |
| src/Uno.UI/UI/Xaml/Controls/WebView/Native/iOSmacOS/NativeCoreWebView2WebResourceRequest.iOS.cs | Adds native request wrapper for WebResourceRequested APIs. |
| src/Uno.UI/UI/Xaml/Controls/WebView/Native/iOSmacOS/NativeCoreWebView2HttpRequestHeaders.iOS.cs | Adds header collection implementation with modification tracking. |
| src/Uno.UI/UI/Xaml/Controls/WebView/Native/iOSmacOS/NativeCoreWebView2Extensions.iOS.cs | Adds helper extensions to access native args/requests/responses. |
| src/Uno.UI/UI/Xaml/Controls/WebView/Native/iOSmacOS/LocalWKUIDelegate.iOS.cs | Adds WKUIDelegate adapter forwarding to managed callbacks. |
| src/Uno.UI/UI/Xaml/Controls/WebView/Core/CoreWebView2.iOS.cs | Adds template lookup for NativeWebView on Apple UIKit. |
| src/Uno.UI/UI/Xaml/Controls/ToolTip/ToolTip.xaml | Removes macos XAML namespace/ignorable usage. |
| src/Uno.UI/UI/Xaml/Controls/ScrollViewer/ScrollViewer.xaml | Removes macOS prefix usage and macOS-specific style entry. |
| src/Uno.UI/UI/Xaml/Controls/ScrollBar/ScrollBar.xaml | Removes macOS prefix usage and macOS-specific style entry. |
| src/Uno.UI/UI/Xaml/Controls/MenuBar/MenuBar.xaml | Removes macOS-specific template/style branches and prefixes. |
| src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Controls/Repeater/Given_ItemsRepeater.cs | Removes macOS-specific Ignore attribute gates. |
| src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Controls/Given_ListViewBase.cs | Updates platform conditional compilation by removing macOS from condition. |
| src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Controls/Given_CalendarDatePicker.cs | Removes macOS-specific Ignore attribute gates. |
| src/Uno.Sdk/targets/Uno.CrossTargeting.targets | Updates compilation rules for *.iOSmacOS.cs to iOS/Mac Catalyst only. |
| src/SamplesApp/UITests.Shared/Windows_UI_Xaml_Controls/Button/Buttons_Native.xaml | Removes macOS-native style definitions and ignorable prefix. |
| doc/articles/uno-development/uno-internals-overview.md | Removes macOS mention from native UIElement inheritance description. |
| doc/articles/uno-development/uno-internals-macos.md | Updates macOS internals doc to reflect Skia-only macOS support and redefines .iOSmacOS.cs meaning. |
| doc/articles/platform-specific-xaml.md | Updates platform-prefix documentation to remove macOS prefix. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-22650/wasm-skia-net9/index.html |
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-22650/docs/index.html |
|
@MartinZikmund You might also want to remove macos stuff from Line 15 in 416a155 |
|
@MartinZikmund there are a bunch of Most specifically, there're this uno/src/Uno.Sdk/targets/Uno.CrossTargeting.targets Lines 36 to 37 in 416a155 uno/src/Uno.CrossTargetting.targets Lines 34 to 35 in 416a155 |
|
@MartinZikmund We should also remove __MACOS__ from the winui sync generator, but probably in a different PR because the diff will be too big |
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-22650/docs/index.html |
|
The build 196233 found UI Test snapshots differences: Details
|
|
The build 196233 found UI Test snapshots differences: Details
|
|
The build 196233 found UI Test snapshots differences: Details
|

GitHub Issue: closes #
PR Type: 🔄 Refactoring
What is the current behavior? 🤔
What is the new behavior? 🚀
PR Checklist ✅
Please check if your PR fulfills the following requirements:
Screenshots Compare Test Runresults.Other information ℹ️