I’m going to address your main point up front, just so we’re not distracted by my “don’t do your own DNS resolution” rant (-: You wrote:
So it would be very apriciated if this field was set :-)
If you want to request a change to the OS behaviour, you should file a bug report along those lines. Please post your bug number, just for the record.
And now back to the rant (-:
So for both portability an asynchrous behavior, we choosed to maintain a full DNS stack.
On the async front, the system resolver on Apple platforms fully supports async execution of arbitrary DNS queries via
DNSServiceQueryRecord
(in
<dns_sd.h>
).
On the portability front, this sounds like a classic trade off between developer and customer convenience. I understand the desire to use the same code on all platforms but…
By the way, I agree it's a lot of work ;-)
I think you missed my point there. It’s not “a lot of work” (well, it is a lot of work, but not just a lot of work), it’s actually impossible. The legacy BIND APIs don’t expose enough info for you to implement a resolver that handles all the situations that the system resolver handles. In various corner cases — and the one I’m most familiar with is VPN — your resolver will give different results from the system resolver.
This can result in very confusing behaviour. For example, imagine that the SIP server also runs a web server for management. The user connects to the web server via Safari and everything works fine. They then use your app to connect over SIP and they get ‘host not found’ errors.
Share and Enjoy
—
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"