swiftxcodebrowser-extensionsafari-app-extension

Get event listener for newtab open/close in new safari app extension in xcode 11


I am new to Safari browser extension development. My requirements are below.

  1. Show user signup screen on clicking the toolbar item for first time and save user details in local storage.
  2. Get callbacks for new tab open/close, active tab details, search title, url.

I referred apple documentation but it is unclear for me to achieve the above tasks. I would really appreciate if some could provide working example and code. thanks


Solution

  • Finally i work around the requirement of safari app extension.

    1. Implemented the user signup screen in safariExtensionViewController.xib. It shows whenever user click on toolbar item or our extension icon click on safari.

    2. I found this awesome https://github.com/prasanaworld/SafariAppExtension-WindowTabManagement library which solved my problem. We will get all window/tab remove add and update listeners with custom ids assigned to each window and tab.