I get the following error when configuring MCBrowserViewController to look for nearby peers. And this is despite appending the required info in info.plist namely,
[MCNearbyServiceBrowser] NSNetServiceBrowser did not search with error dict [{
NSNetServicesErrorCode = "-72008";
NSNetServicesErrorDomain = 10;
}].
NSLocalNetworkUsageDescription
<string>Need permission to discover and connect to My Service running on peer iOS device</string>
NSBonjourServices
<array>
<string>_my-server._tcp</string>
<string>_my-server._udp</string>
</array>
Here is my code:
let browser = MCBrowserViewController(serviceType: "my-server", session: session)
browser.delegate = self
browser.minimumNumberOfPeers = kMCSessionMinimumNumberOfPeers
browser.maximumNumberOfPeers = 1
self.present(browser, animated: true, completion: nil)