Safari extension not showing up

Hi,


I'm trying to investigate the new Safari App Extension architecture but cannot even get through this basic tutorial:

https://developer.apple.com/library/content/documentation/General/Conceptual/ExtensibilityPG/ExtensionCreation.html#//apple_ref/doc/uid/TP40014214-CH5-SW1


FWIW, I'm on El Capitan 10.11.6. My Safari version is 10.0.1. I'm using Xcode 8.0. The only deviations from the tutorial are in the targets that I have defined. I created a new project based on the OSX Cocoa Application template. I then added a macOS Safari Extension template - they are both unmodified. This builds and runs as expected; an empty application window pops up.


In Safari, I then navigate to Preferences -> Extensions. The extension bundled with the app is not available in the left hand pane as directed by the tutorial.


I have got the Develop menu enabled and "Allow unsigned extensions" is checked. I suspect this is some kind of signing issue and that Xcode is ignoring my extension. Each target is "Ad Hoc Signed". FWIW - I did try adjusting Build Settings to "Don't Code Sign" for each target but see the same problem.


Anyone out there experiencing similar issues or have good advice on how to resolve this. I see nothing indicating a problem in any logs and am not sure how to go about debugging this. Any advice would be greatly appreciated!

For anybody suffering the same issue, this started working as documented after I updated everything to the latest: Xcode 8.1, Swift 10.0 (it seemed to lose the .1?!) and Sierra.

I suffered a further similar problem like this with Xcode 8.1 where the extension stopped showing again. Something occurred where my extension stopped being included in my containing app.


This manifested as when performing a programmatic state check on the extension:

SFErrorDomain code = 1 (NoExtensionFound).


In case, anyone else comes looking, I selected the Extension target to build and Safari as the App to run. This runs the extension standalone which is pretty cool! When I switched back to building the containing app, my extension was being included in my bundle again. Seemed like Xcode decided not to copy my extension artifacts into my app bundle for some reason.

I'm experiencing this issue as well. But mine is signed properly
I had this issue a few days ago as well, and it resolved itself after several restarts.
It worked until the next restart, where it suddenly stopped working again.
I find it very strange, because a
Code Block swift
print(error.debugDescription)
seems to output "SFErrorDomain code = 1 (NoExtensionFound)".
This error appears to indicate, that the App couldn't access the extension / the bundle id isn't found, what is very very strange, because the extension is clearly found in "Package Contents" > "Contents" > "PlugIns" and looking at my configuration, the bundle id's are matching.
I have also checked "Allow Unsigned Extensions" in Safari.

Any news on this?

Thanks in advance! :)
Make sure that:

1) The deployment target for your app and extension include the version of macOS you are running
2) Each time you quit/restart Safari, go to the Develop menu and select "Allow Unsigned Extensions".

If those don't work, please collect a sysdiagnose and file feedback at https://feedbackassistant.apple.com

Thanks!

I had a similar problem recently after updating to Xcode 13.2.1 and a MacOS update. My Safari webextensions in development weren't showing up any more in Safari (even with unsigned extensions enabled).

I think it turned out to be a problem with LaunchServices and Safari because running the following in a commandline/terminal fixed the problem:

PATH=/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support:"$PATH"lsregister -f /Applications/Safari.app

Then my extensions started showing up again instantly.

Thank you, @nixoloco. Your solution worked for me. This has been bugging me for months and this fixed it! I am not an extension developer but I have Xcode 13 installed. I don’t know how my Launch Services database got messed up.

Note: add a space before lsregister:

PATH=/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support:"$PATH" lsregister -f /Applications/Safari.app

For anyone having the same issue but the above doesn't work, you may have extensions disabled.

In an older version of safari there was an option in the developer menu to disable extensions, I had previously clicked this option and forgot. I have later updated my OS/Safari and the option disappeared from the developer menu but it turns out the setting remained.

To change the setting you can:

  • Manually update the plist file.

Open the plist file in Xcode found at "~/Library/Containers/com.apple.Safari/Data/Library/Preferences/com.apple.Safari.plist" and set the property "ExtensionsEnabled" to "YES" (mine was set to no).

OR

  • Use the Defaults Command

defaults write com.apple.Safari "ExtensionsEnabled" -bool "false"

I then re-opened safari and my extensions now showed up in the safari Settings

I hope this helps anyone having the same issue.

In my haste of posting I have incorrectly typed the boolean value

defaults write com.apple.Safari "ExtensionsEnabled" -bool "false"

it should be: defaults write com.apple.Safari "ExtensionsEnabled" -bool "true"

Safari extension not showing up
 
 
Q