Enable access for assistive devices programmatically on 10.9

Discussion in 'OS X Mavericks (10.9)' started by vinpai, Jul 24, 2013.

  1. vinpai macrumors newbie

    Jul 24, 2013
    Hello All,

    With 10.9, Apple has moved Accessibility option to System Preferences > Security & Privacy > Privacy > Accessibility. Unlike previous versions of Ma OS X, which used a universal checkbox for all applications, the new functionality in 10.9 allows users to individually choose which apps can gain control of the system to perform their various scripted functions.

    Apple has NOT provided any API to developers to programmatically enable Accessibility for Application. So Mac OS 10.9 will Prompt a dialog for end user permission to enable Accessibility when application uses accessibility APIs. Additionally User has to Relaunch the application after enabling Accessibility.

    Default prompt dialog put up by 10.9 OS for Sample application "Accessibility Inspector".
    On click of "Open System Preferences" the Security & Privacy Preference will open with sample application "Accessibility Inspector". User needs to enable Application using admin password.

    Can we enable access for assistive devices programmatically on 10.9 using Applescript or any other APIs?

    Any help to fix this issue would be greatly appreciated.

    Thanks & Regards
    Vinayak Pai

    Attached Files:

  2. abstert macrumors newbie

    Jun 10, 2008
    Santa Clara, CA
    Command line - Assistive Devices


    I believe the command you are looking for is to find the Bundle Identifier for the application you are trying to add to Assistive Devices.

    /usr/libexec/PlistBuddy -c 'Print CFBundleIdentifier' /Applications/enterapplicationnamehere.app/Contents/Info.plist
    Let's say the application you were trying to add was SKYPE. You would then enter this below:

    /usr/libexec/PlistBuddy -c 'Print CFBundleIdentifier' /Applications/Skype.app/Contents/Info.plist
    And your bundle identifier would be :
    You then use this output in the following command to add the application to Assistive Devices in the Security and Privacy section:

    sudo sqlite3 /Library/Application\ Support/com.apple.TCC/TCC.db "INSERT INTO access VALUES('kTCCServiceAccessibility','enterbundleIDhere',0,1,1,NULL);" 
    For our Skype example:

    sudo sqlite3 /Library/Application\ Support/com.apple.TCC/TCC.db "INSERT INTO access VALUES('kTCCServiceAccessibility','com.skype.skype',0,1,1,NULL);" 
    To remove the application you would use this:
    sudo sqlite3 /Library/Application\ Support/com.apple.TCC/TCC.db "delete from access where client='com.skype.skype';"

Share This Page