Reputation: 73279
I maintain several C++/Qt apps whose purpose is to interact with devices on the LAN (via the TCP and UDP features of the BSD sockets API).
They generally work fine under MacOS, but Apple in its wisdom has added a "Local Network" permission to its "Security and Privacy" settings pane, and if the apps aren't listed and enabled there, then they appear to the user to be broken and I get a bug report from an irritated user.
Therefore, what I would like to do is have my apps explicitly test for the state of this permission on startup, so that if they don't have that permission enabled I can show a dialog with explicit instructions to the user about what the problem is and how to enable Local Network permission.
My question is, how can I explicitly test for the presence/absence of this permission from within my app? (I can of course do a sort-of-test by trying to send/receive data over the local network and seeing if it works, but I'd prefer to check for the permission setting directly since guessing its state from related network behavior is likely to cause misdiagnoses in some scenarios).
Upvotes: 0
Views: 252