"Local network prohibited" 2025 edition

I'm getting "unsatisfied (Local network prohibited)" when trying accessing my local http server running on mac (http://192.168.0.12:8000/test.txt) from an app running on iPhone with iOS 18.4. That's using URLSession, nothing fancy.

This is the contents of the plist file of the app:

NSAppTransportSecurity
	NSExceptionAllowsInsecureHTTPLoads	    true
	NSAllowsArbitraryLoads							    true
	NSAllowsLocalNetworking							    true
	NSExceptionDomains
		192.168.0.12
			NSIncludesSubdomains					      true
			NSAllowsLocalNetworking					    true
			NSExceptionAllowsInsecureHTTPLoads	true

NSLocalNetworkUsageDescription 						Hello

The app correctly "prompts" the alert on the first app run, asking if I want to access local network, to which I say yes. Afterwards I could see that Local Network is enabled in iOS settings for the app, yet getting those "Local network prohibited" errors.

From testing other global IP + 'http only" sites it feels like NSAllowsArbitraryLoads no longer works as it used to work before. But specifying other test "global" HTTP-only IP addresses in NSExceptionDomains work alright, it's just the local address doesn't.

I could access that IP from iOS safari with no problem. The local web site is HTTP only.

Googling reveals tons of relevant hits including FAQ articles from Quinn, but whatever I tried so far based on those hits doesn't seem to work.

Answered by DTS Engineer in 844167022

There are two different things in play here:

It’s easy to tell these apart because they result in different errors:

  • If a request is blocked by ATS you’ll see some some sort of TLS error, typically NSURLErrorSecureConnectionFailed (-1200).

  • If a request is blocked by LNP you’ll see some other type of transport error, commonly NSURLErrorNotConnectedToInternet.

Playing with ATS settings won’t help with an LNP error, and vice versa.

My general advice on the ATS front depends on the final plan for your app:

  • If you plan to deploy a server on the public Internet and only need this for testing, avoid adding an ATS exception. Instead, use the approach described in QA1948 HTTPS and Test Servers.

  • If your app is expected to work with local devices — for example, you’re building an app to configure an accessory — deploy NSAllowsLocalNetworking.

The error you’re seeing, Local network prohibited, is a clear indication of an LNP issue. I’m not 100% sure why you’re hitting it, but I suspect it’s a transient. If you restart your device, does it go away?

Share and Enjoy

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

There are two different things in play here:

It’s easy to tell these apart because they result in different errors:

  • If a request is blocked by ATS you’ll see some some sort of TLS error, typically NSURLErrorSecureConnectionFailed (-1200).

  • If a request is blocked by LNP you’ll see some other type of transport error, commonly NSURLErrorNotConnectedToInternet.

Playing with ATS settings won’t help with an LNP error, and vice versa.

My general advice on the ATS front depends on the final plan for your app:

  • If you plan to deploy a server on the public Internet and only need this for testing, avoid adding an ATS exception. Instead, use the approach described in QA1948 HTTPS and Test Servers.

  • If your app is expected to work with local devices — for example, you’re building an app to configure an accessory — deploy NSAllowsLocalNetworking.

The error you’re seeing, Local network prohibited, is a clear indication of an LNP issue. I’m not 100% sure why you’re hitting it, but I suspect it’s a transient. If you restart your device, does it go away?

Share and Enjoy

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

Thank you. Restarting the device helped indeed. Looks like there's some in memory cache that is not fully updated when I delete / reinstall the app (despite OS is prompting "allow local network" on the first run after reinstall and I answer "yes" to that). I probably have answered "No" the very first time and that somehow polluted that memory cache forever until restart.

Accepted Answer
Restarting the device helped indeed.

Yay!

Looks like there's some in memory cache …

Yep. We recently discovered this bug (r. 131764908) and it’s the root cause of of a bunch of weird problems like this )-: It should be fixed in the iOS 18.6 beta (22G5054d) that we’re currently seeding (-:

Oh, and credit where credit is due: We were able to find and fix that bug as the result of a bunch of hard work by a third-party developer, who found a sequence of steps that reproduce the issue every time. Thank you HT!

Share and Enjoy

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

"Local network prohibited" 2025 edition
 
 
Q