Hi Quinn,
Thanks for your very helpful and clear response. Yes, I did have the NSLocalNetworkUsageDescription property set in the Info.plist.
After much head scratching, I am glad to report that I have now discovered the issue. I had the NSBonjourServices property in the plist, with a number of services listed with which I interacted with elsewhere in the app, such as _hap._tcp, as instructed in Getting Started with Bonjour.
Mysteriously, if that property contains any services, then searchForServices fails for _services._dns-sd._udp. Either deleting that property from the Info.plist, or just deleting all array elements of that property fixes the problem. With that change all searches are subsequently possible. It took me a while to realize that because Xcode doesn't seem to replace the Info.plist in a build when it is changed, but only after clearing the build folder... sigh.
Regarding the resolution of services, Quinn wrote:
Right, because you can’t resolve a service type. Rather, you’re expected to get the type from each result (via the name property) and start new browser for services of that type. That’ll results in services that you can then resolve.
Many thanks, now if I correctly test the results of didFind, and launch a separate NetServiceBrowser for each one, I was then able to resolve individual text records.
With that surprise discovery and with your tip on service resolution, the code is now working well on both macCatalyst and iOS.
Many thanks !
Guy