Post

Replies

Boosts

Views

Activity

SFSafariApplication.openWindow(with:) not working
I am trying to build a utility application on macOS to manage a number of Safari windows and/or tabs. The first task that stumps me is opening a new window. I went back to the basic, created a new "Safari Extension App" project in Xcode 13.2.1. The sample code includes SFSafariApplication.showPreferencesForExtension(withIdentifier:) and that works fine. But when I add my call to : SFSafariApplication.openWindow(with: URL(string: "https://www.apple.com")!) then nothing happens. I tried adjusting the content of NSExtension in the Info.plist of the web extension handler, and a number of other things in the manifest, I verified that my extension was well loaded and active, but without any success with openWindow. Is there any obvious caveat I should be aware of when dealing with SFSafariApplication? Among other questions, should openWindow(...) be in the main app, in the native extension, or either?
1
0
1.4k
Feb ’22
SFSafariApplication.openWindow(with:) not working
I am trying to build a utility application on macOS to manage a number of Safari windows and/or tabs. The first task that stumps me is opening a new window. I went back to the basic, created a new "Safari Extension App" project in Xcode 13.2.1. The sample code includes SFSafariApplication.showPreferencesForExtension(withIdentifier:) and that works fine. But when I add my call to : SFSafariApplication.openWindow(with: URL(string: "https://www.apple.com")!) then nothing happens. I tried adjusting the content of NSExtension in the Info.plist of the web extension handler, and a number of other things in the manifest, I verified that my extension was well loaded and active, but without any success with openWindow. Is there any obvious caveat I should be aware of when dealing with SFSafariApplication? Among other questions, should openWindow(...) be in the main app, in the native extension, or either?
Replies
1
Boosts
0
Views
1.4k
Activity
Feb ’22