-
Notifications
You must be signed in to change notification settings - Fork 390
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
Include IP address for all available interfaces in connection info #52
Comments
react-native-device-info does like the link you mentioned for android - deployed code: https://github.com/react-native-community/react-native-device-info/blob/master/android/src/main/java/com/learnium/RNDeviceInfo/RNDeviceModule.java#L67 |
deployed / apparently-working code for iOS https://github.com/react-native-community/react-native-device-info/blob/master/ios/RNDeviceInfo/RNDeviceInfo.m#L408 |
react-native-device-info only returns the WiFi IP and ignores all other network interfaces. It could easily be added to react-native-device-info but it was decided that it should be added here instead. See the link under related issues. |
@respectTheCode I know, I'm the react-native-device-info guy :-), I was just trying to offer a hot link to the code we have as I try to work with @matt-oakes so that netinfo is more awesome than device-info was in this area. 🤞 |
any update on this? |
@respectTheCode If there's no post here, there is no update on it. Contributions are always welcome 🙂 |
Android and iOS support added in #122 🎉 |
This still only includes the IP address for en0 |
@respectTheCode That was outside the scope of the initial PR. Feel free to send one over to add support for the other network interfaces. |
This ticket shouldn't be closed as it wasn't resolved |
You have a point, as originally stated the ticket was to support the rest of the network interfaces. The title is misleading. I believe it still lacks a motivated person to make the PR though |
Thanks @mikehardy, you are right that the title miss-lead me. @respectTheCode You clearly need this feature. Are you able to submit a pull request to add support for it? It's not a feature I personally need so the likelihood that I'll write it myself it basically 0%. Please let me know if you need some pointers on where to start with making a pull request to add this feature 🙂 I can give you some pointers on where to make the modifications. |
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 / https://github.com/pusherman/react-native-network-info/blob/master/android/src/main/java/com/pusherman/networkinfo/RNNetworkInfo.java#L140 - this could be the basis of implementation as well In fact @matt-oakes you might want to see if you and @pusherman want to collaborate - seems like an API surface area duplication and potential to perhaps have multiple active maintainers in one repo? |
🎉 This issue has been resolved in version 5.2.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Describe the Feature
The connection info should include the IP address for all connected network interfaces (cellular, wifi, wired, vpn?)
Possible Implementations
Add a map of network interface and their IP addresses to the connection info.
Related Issues
react-native-device-info/react-native-device-info#635
#51
The text was updated successfully, but these errors were encountered: