Post

Replies

Boosts

Views

Activity

Reply to DNSServiceQueryRecord works on iOS 12, not ios 13
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]; }}
Jan ’20