Now we have an Xamarin.mac GUI program that needs to get the native IP. I use the following code:
Dns.GetHostEntry(Dns.GetHostName()).AddressList.First(x=>x.AddressFamily == AddressFamily.InterNetwork);
it works on my machine, but get error like "Could not resolve host '...'" on some others.
How can I avoid this error to get the IP ?