Here is an example of the outcome I am trying to achieve:
import SwiftUI
@main
struct SwiftBarApp: App {
@NSApplicationDelegateAdaptor(AppDelegate.self) var appDelegate
var body: some Scene {
WindowGroup {
ContentView()
}
MenuBarExtra("Title") {
MenuBarView(menuItemSet: appDelegate.menuItems[0])
}
MenuBarExtra("Title") {
MenuBarView(menuItemSet: appDelegate.menuItems[1])
}
}
Post
Replies
Boosts
Views
Activity
Thanks for your responses.
What you have described is not what I am looking for. I want to have multiple instances of MenuBarExtra.
I realise I’m piling on here, but this thread seems to be the only place on the Internet where this functionality is being discussed.
Where there are static attributes of your ActivityAttributes class, how are you reflecting those in the push to start payload? The example provided by Apple is a little confusing as it has the same model for content-state and attributes.