Hello,
since we should avoid the appearance of the permission popup at launch, we are planning to ask the user specifically at a later point in time.
If the user has given permission and launches next time, we can browse for Bonjour services at launch.
How can we check on launch if the user has given permission or whether we need to ask the user again?
Post
Replies
Boosts
Views
Activity
According to https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/AboutInformationPropertyListFiles.html property list keys can be put into InfoPlist.strings to be localised.
When adding NSLocalNetworkUsageDescription in InfoPlist.string, it will not show on iOS14 with the newly introduce local network permission dialog. Instead only the “default” text is shown.
Only when NSLocalNetworkUsageDescription is added to Info.plist it will be shown. However it’s not possible to localise it in Info.plist.
We want to prepare our App already and provide localised NSLocalNetworkUsageDescription so that our users have propers information right from the beginning when iOS14 will be available.
FB8128316
We are using NWBrowser.State to check to for NWError.dns(DNSServiceErrorType(kDNSServiceErr_PolicyDenied)) to identify if the user has granted local network privacy permission, which was introduce with iOS14.
This works fine so far but we are seeing that the first update in NWBrowser.stateUpdateHandler after nwBrowser.start is always ready. To overcome this and not respond to a false-positive, we currently need to debounce this first value.
Is this the expected behaviour or a Bug in NWBrowser?