Skip to content
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

[expo-network] Add expo-network unimodule #5074

Merged
merged 39 commits into from Aug 6, 2019

Conversation

@ninjaachibi
Copy link
Contributor

ninjaachibi commented Jul 26, 2019

Why

Create expo-network unimodule to get info about airplane mode, IP address, and MAC address

How

We care about network information for our devices - hopefully we can add more functionality on top of this in the future. We created this similarly to how we previously created expo-device, expo-application, and expo-battery

Test Plan

Tested on sandbox on iOS and Android devices.

vivianzzhu91 and others added 28 commits Jul 22, 2019
ran pod install
Add getMacAddressAsync() and getIpAddressAsync() methods
this fixes the build error with some of the header files of the template files that remain
* include note from Apple
* include optional notation for interfaceName for Android
* implement network types
* need to implement enums
Copy link
Member

esamelson left a comment

this looks really good, nice job @vivianzzhu91 and @ninjaachibi ! thanks for applying a bunch of the stuff you learned from previous PRs. i just have a few small comments, mostly about formatting.

ninjaachibi and others added 5 commits Aug 2, 2019
* add promises to getNetworkStateAsync
* add getMacAddress implementation so web doesn't crash when call it
* use await to implement getIpAddressAsync
* add getMacAddress to docs
ERR_NETWORK_UNKNOWN_HOST -> ERR_NETWORK_IP_ADDRESS
Copy link
Member

esamelson left a comment

just a few more comments, otherwise looks good 👍

packages/expo-network/src/ExpoNetwork.web.ts Outdated Show resolved Hide resolved
packages/expo-network/src/ExpoNetwork.web.ts Outdated Show resolved Hide resolved
packages/expo-network/src/ExpoNetwork.web.ts Outdated Show resolved Hide resolved
packages/expo-network/ios/EXNetwork/EXNetwork.h Outdated Show resolved Hide resolved
vivianzzhu91 and others added 3 commits Aug 5, 2019
add errno in promise rejection
@ninjaachibi ninjaachibi merged commit 9e2cb32 into master Aug 6, 2019
2 of 3 checks passed
2 of 3 checks passed
client Workflow: client
Details
docs Workflow: docs
Details
sdk Workflow: sdk
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.