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:
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 and why would it have worked then a week ago? I'm just confused.
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:
I checked "Allow Unsigned Extensions" and even tried it with the "Sea Creator" Example code found here and some other Safari Web Extensions that I wrote a week ago. They all seem to throw the same error. I guess it could be a corrupted file or something - about that: yup, I already restarted my Mac. Is there a way to "reinstall" Safari without restoring my entire machine?(Error Domain=SFErrorDomain Code=1 "(null)")
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 and why would it have worked then a week ago? I'm just confused.
Thanks in advance! :)