1

I have a safari app extension, which open a popover by clicking on the toolbar item.

<key>SFSafariToolbarItem</key>
    <dict>
        <key>Action</key>
        <string>Popover</string>
        <key>Identifier</key>
        <string>Button</string>
        <key>Image</key>
        <string>ToolbarItemIcon.pdf</string>
        <key>Label</key>
        <string>My Extension</string>
    </dict>

This is the current settings in my info.plist file, in my case I want to show popover on toolbar item click only if user meet some requirements. If the user not meet the requirements and click the toolbar item, I want to send a message to inected script to trigger some action without opening popover.

I am new to safari app extension development, not able to figure out the way.

Vivek Maru
  • 8,347
  • 1
  • 24
  • 34
  • 1
    It appears that popovers and commands are mutually exclusive ‍♂️ I’ve tried setting action to `Command`, then `toolbarItemClicked` starts getting called, but getting the item and calling `showPopover()` does nothing. Oh God it’s such a trainwreck API. – zoul May 27 '20 at 13:39

0 Answers0