local-ip-address icon indicating copy to clipboard operation
local-ip-address copied to clipboard

fix: wrong IP address on iOS

Open julian-baumann opened this issue 1 year ago • 1 comments

This should address the issue of iOS devices providing an incorrect IP address.

I've read online, that this approach might not always work, because it is technically not guaranteed, that the default WiFi interface on iOS is named "en0". But practically I haven't had any issues with it. While this solution might theoretically not work in every case, it represents a quick and practical fix that should prove effective for most iOS devices on most occasions. Compared to the previous situation where the IP address was consistently incorrect, this update should significantly improve the likelihood of obtaining the correct IP address most of the time. During my testing, the correct IP address was consistently obtained on a variety of iOS devices across multiple Wi-Fi networks. I haven't encountered any problems with this approach so far.

julian-baumann avatar Jan 29 '24 12:01 julian-baumann

This should address the issue of iOS devices providing an incorrect IP address.

I've read online, that this approach might not always work, because it is technically not guaranteed, that the default WiFi interface on iOS is named "en0". But practically I haven't had any issues with it. While this solution might theoretically not work in every case, it represents a quick and practical fix that should prove effective for most iOS devices on most occasions. Compared to the previous situation where the IP address was consistently incorrect, this update should significantly improve the likelihood of obtaining the correct IP address most of the time. During my testing, the correct IP address was consistently obtained on a variety of iOS devices across multiple Wi-Fi networks. I haven't encountered any problems with this approach so far.

Interesting. Do you think we could have a fallback in case en0 is not found?

LeoBorai avatar Jan 31 '24 22:01 LeoBorai