Local network prohibited issue

Originator:danijel.kecman
Number:rdar://FB9999999 Date Originated:
Status: Resolved:
Product:iOS SDK 17 Product Version:iOS 17.4
Classification:Error on local network access Reproducible:Yes
 
The app is accessing the local WIFI network. 
The key "Privacy - Local Network Usage Description" is set, and "NSAllowsLocalNetworking" is set to YES. "Allow Arbitrary Loads" is set to YES. Xcode 15.3 builds report the error below on the first attempt to access the local network. 
1. Clean install (there's no app in Settings -> Privacy & Security -> Local Network
2. Try to login
3. The app returns allow local network access
4. Allowed
5. The app returns the error below - the app appears in Settings -> Privacy & Security -> Local Network with enabled status.
6. Try to log in again
7. Since the Local Network access for the app is already enabled everything works

POST 'http://192.168.0.18:1080/api/auth':
cURL:
$ curl -v \
	-X POST \
	-H "User-Agent: StationInfo/1.0 (identifier; build:124; iOS 17.4.0) Alamofire/5.8.0" \
	-H "Accept-Encoding: br;q=1.0, gzip;q=0.9, deflate;q=0.8" \
	-H "Accept-Language: en-US;q=1.0" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-d "p=dan&u=dan" \
	"http://192.168.0.18:1080/api/auth"
---------------------
[Error] POST 'http://192.168.0.18:1080/stationinfo/api/auth' [5.0128 s]:
Error Domain=NSURLErrorDomain Code=-1009 "The Internet connection appears to be offline." UserInfo={NSUnderlyingError=0x302f81440 {Error Domain=kCFErrorDomainCFNetwork Code=-1009 "(null)" UserInfo={_NSURLErrorNWPathKey=unsatisfied (Local network prohibited), interface: en0[802.11], ipv4, ipv6, uses wifi, _kCFStreamErrorCodeKey=50, _kCFStreamErrorDomainKey=1}}, NSErrorFailingURLStringKey=http://192.168.0.18:1080/api/auth, NSErrorFailingURLKey=http://192.168.0.18:1080/api/auth, _kCFStreamErrorDomainKey=1, _kCFStreamErrorCodeKey=50, NSLocalizedDescription=The Internet connection appears to be offline.}

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!