Does c-ares support iOS?

Does c-ares support iOS? I need to use c-ares in my company’s iOS application. But it cannot work correctly using "ares_gethostbyname ()", and the status code in the callback function returns 11 (ARES_ECONNREFUSED) all the time. The same code works correctly on another orearting system such as Win32, Android.

Looking at the source code, I found the reason, that is, c-ares could not get the DNS servers in IOS. Because c-ares reads the /etc/resolv.conf file to get information about DNS servers, but this file does not exist on IOS.

So, do you support the c-ares IOS kernel? Or What is the IOS method for obtaining DNS server information?

+5
source share
1 answer

I found a patch for this that was never merged into a master repo, published in December 2014 .

It would be great if you could try and report on the c-ares mailing list so that we can work on consolidating it and supporting it “officially”.

/ terrible helper c-ares: - (

+1
source

All Articles