Skip to content

Instantly share code, notes, and snippets.

@MSayib
Last active October 11, 2023 02:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MSayib/47ff1e5523d95eb9f2cae3b94ae48d7a to your computer and use it in GitHub Desktop.
Save MSayib/47ff1e5523d95eb9f2cae3b94ae48d7a to your computer and use it in GitHub Desktop.
Manual allow or disallow privacy and security service permission on MacOS

SIP must be disabled to get tccplus working.

TESTED on MBP M1 Pro, MacOS Ventura

STEP 1

Download : https://github.com/jslegendre/tccplus/releases/tag/1.0

Because tccplus need bundleID, you can get it by running this command:

grep 'BundleIdent' -A 1 /Applications/CleanShot\ X.app/Contents/Info.plist

OR

grep 'BundleIdent' -A 1 /Applications/<DRAG & DROP YOUR APP HERE>/Contents/Info.plist

STEP 2

tccplus add <SERVICE_NAME> <BUNDLE_ID>

/Users/sayib/Downloads/tccplus add Microphone pl.maketheweb.cleanshotx

or to remove:

tccplus reset <SERVICE_NAME> <BUNDLE_ID>

/Users/sayib/Downloads/tccplus reset Microphone pl.maketheweb.cleanshotx

STEP 3

codesign -dr - /Applications/CleanShot\ X.app

Now run your app.


Alternative way is to make an alias so you dont have to execute 2 commands everytime you want to add/remove permission. Use this script:

addPermission() {
    if [ $# -ne 2 ]; then
        echo "Missing parameter! e.g: 'addPermission <SERVICE> <APPLICATION>'"
    elif [[ ! -d "$2" || ! "$2" =~ \.app$ ]]; then
        echo "Invalid application path! The second argument must be a valid directory ending with '.app'."
    else
        v=$(osascript -e "id of app \"$2\"")
        ~/Downloads/tccplus add "$1" "$v"
    fi
}

I made 2 variables $1 and $v, you can change to any letter. First one to get input <SERVICE> and the second to get <APPLICATION> location. You can also change the function name.

  • Change : ~/Downloads/tccplus to your tccplus location
  • Useage: addPermission Microphone

Please dont copy and make your own, please refer to this gist if you find this helpful, thank you. | @ibb.ac

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment