My App is a rather small menu-bar status-item app with 2 informational windows. It does NOT make use of ANY of the APIs mentioned here: https://developer.apple.com/forums/thread/663874 that are bound to need "Local Network" hence trigger TCC dialog.
Yet - on first run of the app, the dialog pops.
App is Obj-C, and the only APIs used are Notification-Center (for scheduling local notifications to the user), XPC connections and calls to other (our) apps for gathering that information, plus normal AppKit windowing (Controls, Text-fields, etc.) nothing else.
Obviously SOMETHING I do causes the thing - and I know for sure this app DOES NOT NEED access to the local network - only I do not know how to identify the specific API I need to avoid using (or change the way I'm using)
- Are there any specific system logs to watch for?
- Is there any official set of APIs that will trigger the dialog?
- Provided that I cannot avoid this - could this permission be granted via MDM profile payload? Our product comes with
Are there any specific system logs to watch for?
I’ve yet to come up with such a list. My experience from iOS is that not all LNP triggers will actually result in system log entries. However, some do, and so it is useful in to look in the system log to see what you can see. Search for both Local Network
and LocalNetwork
, case insensitively.
One approach that you can use is to add your own log points to your app’s startup sequence. If you then see an LNP log event, you can compare its timing with the timing of your log points.
The other approach is just to temporarily rip stuff out of your app until it stops generating the alert, and then more slowly add stuff back in to try to isolate the cause.
Is there any official set of APIs that will trigger the dialog?
No. It’s actually quite hard to do that because a) there are a lot of networking APIs, and b) they only trigger LNP when you talk to the local network. So, for example, the BSD Sockets connect
call might trigger LNP, or you might only be using it for remote networking, or you might just be using it for IPC via a Unix domain socket.
Provided that I cannot avoid this - could this permission be granted via MDM profile payload?
Last I checked there’s no configuration profile payload to suppress LNP. I’m pretty sure I’ve sent others folks off to file an enhancement request for that. I don’t recall whether anyone did that, so I recommend that you file your own.
Please post your bug number, just for the record.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"