I'm testing my app on iOS 14. One of its features involves listening for Bonjour connections on the local network using NetService#publish. When my app calls this method for the first time, I get the new iOS 14 popup asking the user if my app should have access to the local network. If they allow access, everything is fine.
However, if the user denies access, my NetService delegate never receives netService(didNotPublish:). I was hoping to get an error code here that I could use to inform the user that the feature isn't working specifically because they disabled the Local Network permission.
Unfortunately, this is not treated as an error condition - the only way I've found to detect this situation at all is that my netService(didPublish:) method never gets called if the Local Network permission has been disabled.
Is there a better way to detect this situation and inform the user that the app needs Local Network access to continue?
However, if the user denies access, my NetService delegate never receives netService(didNotPublish:). I was hoping to get an error code here that I could use to inform the user that the feature isn't working specifically because they disabled the Local Network permission.
Unfortunately, this is not treated as an error condition - the only way I've found to detect this situation at all is that my netService(didPublish:) method never gets called if the Local Network permission has been disabled.
Is there a better way to detect this situation and inform the user that the app needs Local Network access to continue?