问题
I have tried to fetch /etc/resolv.conf by open("/etc/resolv.conf", 0644)
but it return -1 and the errno is 2 which means "no such file"
what can I do?
回答1:
You can't access files outside your Application's sandbox.
来源:https://stackoverflow.com/questions/2972805/how-to-get-dns-server-ip-in-iphone