-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
getIPAddress() returns 0.0.0.0 when testing on a real device on cell service? #496
Comments
Same - @hsunami10, thoughts? |
Android devices with wired ports have the same problem。 |
Have you read the docs related to the APIs in question? I know there are moves to limit visibility on networking info without special permissions (and special scrutiny) in some Android versions, maybe it's the same with iOS? When you say "all versions of everything are on the latest" that isn't very helpful unfortunately. For any problem report to be reproduced we need the versions of everything in use - react-native, this module, device operating system etc. |
We're going to work together with react-native-netinfo to get this functionality built in that package - not closing this yet, but keep an eye on that repo as well per #635 |
I just looked at getIPAddress and it's just looking through wifi, not cell, so I suppose that makes sense. https://github.com/react-native-community/react-native-device-info/blob/master/ios/RNDeviceInfo/RNDeviceInfo.m#L302 I would say the react-native-network-info package has a stronger implementation of this feature if it is a requirement for you, in their getIPV4Address method: https://github.com/pusherman/react-native-network-info/blob/master/ios/RNNetworkInfo.m#L168 |
Our network information features will be re-homed to react-native-community/netinfo so I'm resolving this in favor of the tracking issue there for non-wifi interfaces: react-native-netinfo/react-native-netinfo#52 - note that the react-native-network-info module is still the best API provider at the moment for this info |
Running DeviceInfo.getIPAddress() when testing through Xcode on a real iOS device returns "0.0.0.0" as an IP address when on cell service? All versions of everything are on the latest, and everything is correctly linked (manually)
The text was updated successfully, but these errors were encountered: