Trying to debug this on an iOS 14.4 device right now. Had no alert, nothing in Settings-Privacy-Local Network, resetting Location & Privacy did nothing, ditto deleting/reinstalling the app. Meanwhile all local network access was working. Finally restarted device, deleted app, reset settings, installed app, and now I see the prompt. Except with the prompt up on the screen my URLSessionDataTask fails with an error code of -1009 and a description of The Internet connection appears to be offline which is obviously very unhelpful.
If I allow access by toggling the switch (that has now appeared) on everything works as expected, and if toggle it off my requests immediately start getting the connection offline response again.
How exactly are developers supposed to code around this? We have no way of knowing whether the user has even seen a prompt, never mind how they responded to it. I know that I can set waitsForConnectivity on my URLSessionConfiguration but that just kicks the can down the road if there's no way of identifying a denial.
Edit: I did just set waitsForConnectivity and if I allow the local network access I see the initial request complete successfully, however if I deny the access the request closure does not execute. No failure, just hangs out doing nothing.
Post
Replies
Boosts
Views
Activity
For me this was happening until I unchecked Connect via network on the iPhone I'd previously set up that way. After that the beach ball problem went away.