I have searched the web for hours but can not find a way to request local network permission in my app.
I have added NSLocalNetworkUsageDescription to info.plist but I can not find a way to trigger a dialog prompt to request access or handle things gracefully.
I have a UDP socket that opens when the user presses go however on first installs the privacy prompt appears when the socket opens, after the user pressed go, so now there is a prompt shown in front of everything while the session and timers are now running.
Is there any way to prompt the user for network access prior to starting a session? My impression is that without this ability it's just bad UX and I think most users will be very confused when prompt appears while also session starts running but the network is inaccessible.
I think I saw other similar forum topics but none of them had solutions, is there a solution now in 2022 or any way to help improve the user experience of my app? Id like to somehow request network access with a way to handle the result programmatically?