Disable Local Network programmatically

Is it possible to disable Local network option from xcode, so that do not popup notification to user about turn off /on and user could not disable or enable it

Accepted Reply

First of all, thanks for the feedback.

In general, I don't want our app to be able to use this local network feature, for some reason it throws a corresponding request when receiving an rtsp stream, and we just want it to always be a response of not allowing because we don't need this feature.

Replies

I’m not sure I understand what you’re looking for here. The obvious way to avoid the local network privacy alert is to not make requests on the local network. But that seems a bit too obvious (-: Can you explain what I’m missing?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

First of all, thanks for the feedback.

In general, I don't want our app to be able to use this local network feature, for some reason it throws a corresponding request when receiving an rtsp stream, and we just want it to always be a response of not allowing because we don't need this feature.

it is possible to disable or make it that way to not to pop up from the code

Where is that screen shot from? I thought it might be a Personal Hotspot thing, but it doesn’t show up in Settings > Personal Hotspot on my iPhone.

it is possible to disable or make it that way to not to pop up from the code

You mean there’s an alert as well? If so, please post a screen shot of that.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

when the app is trying to stream at that very moment I receive this pop up notification alert, then it also appears in app settings which we want to be disabled.

The user should not be able to turn it on. (or at least it to be disabled by default...)

) .

Thanks for those screen shots. That makes your request much clearer [1].

To start, I want to point you the Local Network Privacy FAQ. This offers a bunch of general background about this issue.

To answer your direct question:

  • No, there’s no way that your app can say “I never want to present the local network privacy alert.” It comes up any time your app does stuff that requires the privilege, per FAQ-2.

  • Having said that, I think that’d make a great enhancement request, and I encourage you to file it as such. 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"

[1] In your first screen shot your app name with “Tether” and that confused me.

Yes I would probably want the same

I would guess in many cases there is a third party library that triggers the alert and not something the app developer wants or needs, and sometimes it can be hard to change and still keep the other parts of the library

Yes I would probably want the same

In that case, please do file an enhancement request for it, and then post your bug number.

Ben77 didn’t post a bug number, so I’ve no idea whether they filed this or not )-:

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"