macOS accessibility API on WebKit applications with AXTextMarker

后端 未结 3 1298
没有蜡笔的小新
没有蜡笔的小新 2021-01-16 07:18

I need to access data from webkit applications such as Safari, Mail and maybe others. I can see in the Accessibility Inspector there is :AXTextMarker

3条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-16 07:51

    Accessibility apps need to be added in System Preferences in the following section:

    System Preferences -> Security & Privacy -> Privacy tab -> Accessibility (on the left)

    Note that during development you need to include Xcode in this list if you are developing/running within Xcode.

    I didn't test out your exact code, but I tested some comparable swift code and that worked fine provided Xcode was added in that spot in system preferences.

提交回复
热议问题