MCBrowserViewController error -72008

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)

Ok it works. The issue was I was modifying the info.plist file in the target which I opened by browsing the source tree. But when I selected the target in XCode and opened the info.plist by tapping the 'Info' tab in the Target, this info.plist is different. No idea how it happened. It may be a separate question altogether how to identify and find the real info.plist in use by XCode.

MCBrowserViewController error -72008
 
 
Q