Reputation: 41
Recently i updated my phone to iOS 14 and since then netServiceBrowser.searchForServices(ofType:"xyz._tcp", inDomain: "local.") not working at all. iPhone is not able to discover any services and not calling any NetServiceBrowserDelegate methods.
Upvotes: 3
Views: 5535
Reputation: 715
here is my solutions that work for me well
<key>NSLocalNetworkUsageDescription</key>
<string>Allow Flutter tools on your computer to connect and debug app</string>
<key>NSBonjourServices</key>
<array>
<string>_dartobservatory._tcp</string>
</array>
Upvotes: 1
Reputation: 305
If you use Bonjour, you need to déclare it in info.plist too...
<key>NSBonjourServices</key>
<array>
<string>_http._tcp</string>
</array>
Upvotes: 6
Reputation: 810
Your app requires access to the local network, and iOS14 has a new privacy option that requires authorization for this.
You have to add NSLocalNetworkUsageDescription
to your Info.plist, see apple docs
Upvotes: 6