前言
该提示为Mac OS X用于所有未签名的联网应用程序(也就包括了我们运行到模拟器的应用程序)的标准防火墙消息。
如何取消该提示?
需要将 XCode 的 Simulator 永久添加到防火墙的允许应用中。
在终端中运行:
#temporarily shut firewall off:
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setglobalstate off
#put Xcode as an exception:
/usr/libexec/ApplicationFirewall/socketfilterfw --add /Applications/Xcode.app/Contents/MacOS/Xcode
#put iOS Simulator as an exception:
/usr/libexec/ApplicationFirewall/socketfilterfw --add /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app/Contents/MacOS/Simulator
#re-enable firewall:
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setglobalstate on
即可成功关闭提示。