iOS 14 DNS service registration fails using dns_sd.h with error -65555

Code Block
   DNSServiceFlags flags = includeP2P ? kDNSServiceFlagsIncludeP2P : 0;
  DNSServiceErrorType err = DNSServiceRegister(&registerRef, flags, interfaceIndex, name, type, domain, NULL,
                    bigEndianPort, txtLen, txtData, registerServiceCallBack, (__bridge void *)([self setCurrentCallbackContextWithSelf]));


On iOS 14 when building with XCode 12, the call to to DNSServiceRegister is failing with error -65555. When running app store version built with XCode 11, this error doesn't occur.

We use this for device-to-device communication over Bluetooth when the wifi is directly connected to a device without internet (such as a digital camera). The app has "Always Allow" Bluetooth permission per CBManager.authorization.

Any ideas?
iOS 14 DNS service registration fails using dns_sd.h with error -65555
 
 
Q