Ok, I can do that but meanwhile I just need my app to work. Do you know a reliable way to retrieve the dns name of a device on a local network, given its ip address?
Post
Replies
Boosts
Views
Activity
I guess I can assume this is a bug in iOS 13, since I have not received a response.
And to add insult to injury, it works fine on the simulator, iPad Pro, iOS 13.3
Since adding the flag kDNSServiceFlagsTimeout, the callback is called with an error indicating that it timed out. Before adding that flag, the callback would never be called. (on my iPad Pro running iOS 13.3)Of course when executing it on my iPad Pro running 12.3.1 the callback is called either way.Furthermore, and more importantly, when the callback is called on the iPad Pro running 12.3.1 the machine name of the arp address that was provided when I called DNSServiceQueryRecord, is provided via the callback through the parameter called rdata in the callback example below:static void QueryRecordCallback ( DNSServiceRef dnsServiceReference, DNSServiceFlags flags, uint32_t interfaceIndex, DNSServiceErrorType errorCode, const char * fullname, uint16_t rrtype, uint16_t rrclass, uint16_t rdlen, const void * rdata, uint32_t ttl, void * context) { DNSServiceRefDeallocate(dnsServiceReference); char result[1024] = {0}; dn_expand(rdata, rdata + rdlen, rdata, result, 1024); if (strlen(result) > 0) { NSString *machineName = [[NSString stringWithUTF8String: result] stringByDeletingPathExtension]; }}