How to get rid of firewall asking when developing a program?
Code Signing
Your binary needs to be code signed with codesign.
The permission to accept incoming network connections is associated with the meta-data and signature of the binary, not the specific binary. The intent is to allow users to upgrade their software without discarding all their previous security settings.