macossafari-extensionsafari-content-blocker

Safari macOS content blocker only works once


Strange problem. I'm building a safari content blocker. When I run the host app the content block extension appears in the safari extensions preference window. Everything works fine. Except, it only works the first time I run it. Subsequent times nothing happens, nothing appears in the preference window. The extension is missing. I have no idea why and my search didn't yield a solution.

I tried with Safari 12 and 13 beta. macOS 10.14.5 Tried building a new content blocker, same result.


Solution

  • check to make sure that Allowed Unsigned Extensions is selected under the Develop menu.

    If so proceed with the below.....

    Close Safari

    In XCODE you need to Clean Build folder. XCODEMenuBar>Product>{click stop if clickable}>Clean Build Folder.

    Now rebuild. Open Safari>Select Allow Unsigned Extensions from develop menu.

    Safari>Preferences>Extensions> now your extension should show up.