This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This script will disable firewall rules for Xcode and iOS simulator, so no more "Do you want the application xxxx to accept incoming network connections?" prompts will be displayed. | |
# Password prompt will be skipped if current user is super user, for example in most CI/CD runners | |
echo "Enter password to temporarily disable firewall" | |
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setglobalstate off | |
echo "Adding Xcode to exceptions" | |
/usr/libexec/ApplicationFirewall/socketfilterfw --add /Applications/Xcode.app/Contents/MacOS/Xcode | |
echo "Adding iOS simulator to exceptions" |