Post

Replies

Boosts

Views

Activity

How to permanently move Command+A focus from SideBar to DetailView?
My NavigationSplitView is very simple. The DetailView contains Table populated with data. SideBar populated with items that act as a filter for Table content. If I'm on the SideBar and hit Command-A, I never want to select everything in the sidebar. I always want to select all the content for a detail view. This is how Finder works. I tried to set List(...) { ... } .focusable(false) When I launch the application, Command-A works exactly as I would like. But when I select another "filter" in sidebar with the mouse, the List becomes focusable.
0
0
121
Oct ’24
Unable to set image in media sessions metadata
Open music.yandex.ru Open browser console Paste this code: navigator.mediaSession.metadata = new MediaMetadata({ title: "11111111111", artist: "222222222", album: "3333333333", artwork: [ { src: "https://avatars.yandex.net/get-music-content/5375761/c8e05100.a.19837155-1/200x200" } ]}); Open Now playing widget. Title, artist, album is set correctly. Cover not set. macOS 13.0.1 (22A400) Safari 16.1 (18614.2.9.1.12) Note! In macOS 12.6.1 Safari 15.6.1 (17613.3.9.1.16) all works as expected.
25
4
6.3k
Dec ’22
NSWorkspace launch and activate application despite activates property of OpenConfiguration set to false.
Hello. As described in the title - NSWorkspace launch and activate application despite activates property of OpenConfiguration set to false. I want to launch Safari Extension Container (main application) as helper: func launchMainApp() { guard let mainAppAsHelperURL = NSWorkspace.shared.urlForApplication(withBundleIdentifier: mainAppBundleIdentefier) else { return } let openConfiguration = NSWorkspace.OpenConfiguration() openConfiguration.activates = false NSWorkspace.shared.openApplication(at: mainAppAsHelperURL, configuration: openConfiguration, completionHandler: { mainApp, err in if let error = err { DispatchQueue.main.async { let alert = NSAlert(error: error) alert.runModal() } } else { Self.mainApp = mainApp } }) } The Safari Extension have popover. Launching helper performed when the popover shown: override func popoverWillShow(in window: SFSafariWindow) { if Self.mainApp == nil { log(name: "Launch Mainapp as helper", t: "") launchMainApp() } } The popover opens and immediately closes and Safari becomes inactive. This is not the result I was expecting. But this happening when application installed from TestFlight. When i build app on my mac and open extension’s popover by clicking icon in Safari toolbar everything ok, helper launches and popover stay opened. Please help me resolve these issues. Thank you.
0
0
591
Apr ’23
Override system player events for safari.
Hello. I’m working on safari app extension which control playback mediatems in music.yandex.com service. Unfortunately keyboard media keys does’t support yandex music service. It is possible to override system player events for safari? I planned to make my app a Now Playing App, but when playing media in safari, the browser itself becomes Now Playing App and intercepts media key events. Can this behavior be overridden? Thank you.
0
0
501
Aug ’22