-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: wrong IP address on iOS #132
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @julian-baumann! Thanks for opening this PR, can you give a check on the clippy issues please?
#[cfg(any( | ||
target_os = "ios" | ||
))] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this can be condensed into:
#[cfg(any( | |
target_os = "ios" | |
))] | |
#[cfg(target_os = "ios")] |
#[cfg(any( | ||
target_os = "ios" | ||
))] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this can be condensed into:
#[cfg(any( | |
target_os = "ios" | |
))] | |
#[cfg(target_os = "ios")] |
Interesting. Do you think we could have a fallback in case |
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.