Skip to content

Instantly share code, notes, and snippets.

@puryfury
Last active May 29, 2022 12:52
Show Gist options
  • Select an option

  • Save puryfury/a70eb84be8df3473e0053f1c1a78aa6e to your computer and use it in GitHub Desktop.

Select an option

Save puryfury/a70eb84be8df3473e0053f1c1a78aa6e to your computer and use it in GitHub Desktop.
Exclude from Gatekeeper quarantine in your downloaded app file for testing your app.
#!/bin/bash
alias napp='xattr -cr'
expapp() {
if [ -z "$1" ]; then
echo "usage: [sudo] exapp /Applications/Some.app"
return 1
fi
if [ "$EUID" -ne 0 ]
then echo "You must call this command with using sudo or root!"
echo "(ex: sudo expapp myapp)"
return 2
fi
xattr -rd com.apple.quarantine "$1"
codesign -f -s - --deep "$1"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment