0

How am I supposed to open the Safari Extension Preferences window with the user click of a button in macOS Catalyst? It looks like the API is not available for Catalyst.

Cesare
  • 9,139
  • 16
  • 78
  • 130

1 Answers1

0

You could try with an AppleScript

tell application "Safari" to activate
tell application "System Events"
    tell process "Safari"
        keystroke "," using command down
        click button 9 of toolbar 1 of window 1
    end tell
end tell

The button 9 of the toolbar should be the extension panel

You could look in this answer to execute the AppleScript inside the code of your application Can you execute an Applescript script from a Swift Application

Alberto
  • 383
  • 7
  • 18