For UIKit on Mac Catalyst (and soon on iPadOS with trackpad support in iOS 13.4) we can use the UIHoverGestureRecognizer to listen for mouse hover event and adjust view accordingly. On AppKit on macOS there is the NSTrackingArea for tracking the mouse cursor.
I can't seem to find a way to recognize the hover gesture in SwiftUI. In the Gestures page of SwiftUI documentation there's only support for tap, long press, drag, magnification (zoom), and rotation. There is no indication of mouse hover.
Anyone have a way to do that?
The answer should preferably run natively on both iOS app (UIKit with UIHostingController) and macOS app (AppKit with NSHostingController)