Hello dear Apple Community,
I'm pretty new to this, so probably this is a simple fix...
I just created a Safari Web Extension from the "official" template in Xcode (File > New > Project > Safari Extension App). I ran it an it popped a window open which has a button that says something like "Quit and open Safari Preferences".
I press it and nothing happens. Weirdly though, a week ago, I tried pretty much the same -> worked perfectly. But now it doesn't. So I made the button press event look like this:
And it printed me out this error:
Thanks in advance! :)
I'm pretty new to this, so probably this is a simple fix...
I just created a Safari Web Extension from the "official" template in Xcode (File > New > Project > Safari Extension App). I ran it an it popped a window open which has a button that says something like "Quit and open Safari Preferences".
I press it and nothing happens. Weirdly though, a week ago, I tried pretty much the same -> worked perfectly. But now it doesn't. So I made the button press event look like this:
Code Block swift @IBAction func openSafariExtensionPreferences(_ sender: AnyObject?) { SFSafariApplication.showPreferencesForExtension(withIdentifier: extensionBundleIdentifier) { error in guard error == nil else { print(error.debugDescription) return } DispatchQueue.main.async { NSApplication.shared.terminate(nil) } } }
And it printed me out this error:
What am I missing? Afaik the error means that my extension wasn't found or that I'm not the owner, but how could that be... because why would Xcode give me an invalid template?Optional(Error Domain=SFErrorDomain Code=1 "(null)")
Thanks in advance! :)