I have a Mac Catalyst App that I switched over to the SwiftUI lifecycle. I am trying to add MenuBarExtra to the app :
if #available(macOS 13.0, *) { MenuBarExtra("....", systemImage: ......) { .......... } }
However, I get an error : 'init(_:systemImage:content:)' is unavailable in iOS 'MenuBarExtra' is unavailable in iOS
How do I add MenuBarExtra to the app?
In many cases, wrapping your UIKit code in UIViewControllerRepresentable works well, since (by its sort of legacy nature) it's likely to still be pretty self-contained, functionally.
I don't really have any other suggestions. The likelihood was that one of your porting steps would turn out to be awkwardly big, and maybe this is the one. 🙂