Found the WWDC session about the new stuff in Extensions, looks great, and the session was good.
Generated one, and my toolbar button is showing up but clicking it does nothing. Nothing appears in the console. Then I added some code to make it show a popover and that also does not get called.
The following:
override func toolbarItemClicked(in window: SFSafariWindow) {
// This method will be called when your toolbar item is clicked.
NSLog("The extension's toolbar item was clicked")
window.getToolbarItem { toolbarItem in
toolbarItem?.showPopover()
}
}
The function was already there, I added the iteration over the toolbarItems and the call to showPopover() (per the session).
And then the method, in the handler looks thus:
override func popoverWillShow(in window: SFSafariWindow) {
window.getAllTabs { tabs in
let tabCount = tabs.count
NSLog("found \(tabCount) tabs")
}
}
And this never gets called. Nothing shows up in the console and the breakpoint is never called.