Closed mykola-mokhnach closed 5 months ago
:tada: This PR is included in version 7.1.2 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
After the change, the obtained IP address cannot be directly opened in the browser anymore, while previously, the IP address could be directly opened on ports 8100 or 9100. @mykola-mokhnach @KazuCocoa
My a couple of real devices had no issue with this. What kind of ip addresses were assigned to your en
interfaces?
My en
interfaces were assigned an IP address corresponding to "phone.local-169.254.9.200" instead of the IPv4 address of the device.
How did you configure the ip address?
Could you share the list of assigned IP addresses like the below? https://stackoverflow.com/questions/7072989/how-to-get-my-ip-address-programmatically-on-ios-macos
e.g. addresses
:
I assume in the previous implementation, if(![interfaceName containsString:@"en"]) {
, your env returned ipv4 accidentally. The result could also be the phone.local-169.254.9.200
but the order was fortunately not en0
as the beginning.
if(![interfaceName containsString:@"en"]) {
return en2
So, en0
, which was expected to be WiFi's primary IP address, was 10.18.10???
, but your env also had an accessibble 169.254.9.200
? Perhaps we could show possible IP v4 addresses as the device as another method then
Yes, 10.18 is the IP address of WiFi, but I cannot open the corresponding ports 8100 or 9100 in the browser. However, the 169.254 returned by en2 can directly open port 9100. Can you directly open port 9100 using the IP returned by en0?
Yes. my env's primary local ip address which is available via the device's Settings app is the en0
.
My device had another IP address, 169.254.119.165
, also worked as same as en0
, but it was not exposed to users via the Settings app. Perhaps it was for https://stackoverflow.com/questions/21464364/how-does-the-ios-reachability-class-work-and-why-the-ip-address-169-254-0-0#:~:text=When%20you%20fail%20to%20get%20an%20IP%20address,unable%20to%20obtain%20an%20IP%20address%20from%20DHCP. so in this method's intention, the address is not expected.
Btw, I guess 10.18....
could be your own private network. Could it block some network requests? What IP address is available via your device's Settings -> WiFi config?
Btw, I guess
10.18....
could be your own private network. Could it block some network requests?
It is possible, as I am using the company's network.
We must only assume that the
en0
is the device's Wi-Fi interface instead of any interface whose name starts withen
. See https://stackoverflow.com/questions/30748480/swift-get-devices-wifi-ip-address for more details