IOS App tcp connect and local network permission

Recently, my application was having trouble connecting socket using TCP protocol after it was reinstalled. The cause of the problem was initially that I did not grant local network permissions when I reinstalled, I was aware of the problem, so socket connect interface worked fine after I granted permissions. However, the next time I repeat the previous operation, I also do not grant local network permissions, and then turn it back on in the Settings, and socket connect interfcae does not work properly (connect interface return errno 65, the system version and code have not changed). Fortunately, socket connect success after rebooting the phone, and more importantly, I was able to repeat the problem many times. So I want to know if the process between when I re-uninstall the app and deny local network permissions, and when I turn it back on in Settings, is that permissions have been granted normally, and not fake, and not required a reboot to reset something for socket coonnect to take effect.

Answered by DTS Engineer in 845135022

iOS 18.x, where x ≤ 5, have a known problem where local network privacy’s on-disk state gets out of sync with it’s in-memory state. If you have to restart your phone to resolve an issue, it’s likely you’re hitting that. See this thread for more about this issue.

Share and Enjoy

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

iOS 18.x, where x ≤ 5, have a known problem where local network privacy’s on-disk state gets out of sync with it’s in-memory state. If you have to restart your phone to resolve an issue, it’s likely you’re hitting that. See this thread for more about this issue.

Share and Enjoy

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

It’s better to reply as a reply, rather than in the comments; see Quinn’s Top Ten DevForums Tips for this and other titbits.

I can reproduce this with iOS 26.

Beta 1? Or beta 2?

Share and Enjoy

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

The version is iOS 26.0(23A5260n). Thanks for your reply.

OK, that’s beta 1. Beta 2 is 23A5276f.

Can you retry on 26.0b2? Due to the recent nature of this fix, it’s possible that it didn’t make b1.

Share and Enjoy

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

I have retry on 26.0b2. The issue did not reproduce in this version, it should have been resolved.

IOS App tcp connect and local network permission
 
 
Q