For iOS14 we are supposed to get the local network permission from the user. The app works fine if I run directly on the device or export it as an Enterprise application. If I upload the same app to Test flight I am getting the following error.
App Info.plist(NSBonjourServices) does not allow
‘_xxx-xxx-config._tcp.’ for (Lhoapp)
What is this error? How to fix this?
In Info.plist I have added the following services used in app:
<key>NSBonjourServices</key>
<array>
<string>_xxx-xxx-config._tcp</string>
<string>_iri._tcp</string>
</array>
I am getting the following errors in the log
["NSNetServicesErrorDomain": 10, "NSNetServicesErrorCode": -72008]
I have enabled the Local network permission under privacy for the app
2
Answers
Apple document indicates that for
NSLocalNetworkUsageDescription
Then you need to add
NSLocalNetworkUsageDescription
And your plist should be like this, of course change your app name and tcp.Adding both of NSLocalNetworkUsageDescription and
NSBonjourServices keys in Infos.plist is the correct solution for me. This is required since iOS 14 and it makes NSNetServices finding services.
Thank a lot for this information.