问题
I’m trying to debug a Bonjour network routine, and every time I run it, the Mac’s firewall asks “Do you want the application ProjectName to accept incoming network connections?”
I click “allow,” give it the administrator name and password, and the app is duly added to the firewall’s list of allowed incoming-connections apps…until the next run.
Debugging this sync routine is cumbersome as it is. It’s really a nuisance having to type in the admin and password for every run. Of course I could get around this by running the Mac as admin, but I’d rather not compromise the security that way.
Does Xcode have some project setting that will calm the firewall?
回答1:
You should code sign your app. The firewall is much more lenient toward apps that are signed.
To do that, you need to go into your Project Settings and in the Code Signing section, you should add one of your provisioning profiles as the Code Signing Identity.
There's a pretty good description of the process here.
来源:https://stackoverflow.com/questions/10363479/firewall-impeding-bonjour-network-debugging