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

iOS support + android utp-native support (hole punching) #22

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

jimpick
Copy link
Contributor

@jimpick jimpick commented Jun 25, 2018

I've been working with mafintosh to get support for cross-compiled native modules working.

With these patches, it should be possible to use the app on an iOS device (64-bit only).

The native modules are in the following extra npm packages:

I haven't built x86_64 versions (which the iOS emulator would use).

It should also be possible to build native modules for Android ... the utp-native package in particular will help in making connections from behind firewalls.

@staltz
Copy link
Contributor

staltz commented Jun 25, 2018

Looks good! I could try running this PR on my macOS (not my main computer), but I'd rather just merge, trusting that it's right.

@vesparny
Copy link
Contributor

I can try to run it on my mac if you want

@nikolaiwarner
Copy link
Member

@jimpick I'm running the branch on a 6+. I think i saw my user join for a moment in the users list in the cli, but it's hanging at loading the channels and never finishes. I'm getting a Connection has no connected handler error in the log... not sure if that's related.

@jimpick
Copy link
Contributor Author

jimpick commented Jun 26, 2018

The "Connection has no connected handler" errors are a React Native thing - I believe they are unrelated. I couldn't get them to go away during development.

facebook/react-native#10027

I noticed that the channels take a very long time to long on the first attempt. You might have to restart the app several times. It might work better if you create a clean cabal dat and try to connect to that. I know that HyperDB has some replication issues that might also be causing havoc (when I get time, I plan to try to get a test case for that).

In the longer run, I think all of these peer-to-peer apps will need to show a bit more feedback in the UI with progress indicators, propagation feedback, swarm health, etc.

@jimpick
Copy link
Contributor Author

jimpick commented Jul 1, 2018

I just added x86_64 (aka x64) prebuilds for the iOS simulator, so it should work there.

I can get it to work if I start a new cabal ... cabal --db ./db

I haven't been able to get it to sync to the public cabal at dat://59813e3169b4b2a6d3741b077f80cce014d84d67b4a8f9fa4c19605b5cff637f ... i think it might have too much history. It might be hitting some hyperdb bugs.

@jimpick
Copy link
Contributor Author

jimpick commented Jul 2, 2018

I made some android prebuilds for utp-native as well. With utp support, Android should be able to do "hole punching" in certain behind-the-firewall situations.

@jimpick jimpick changed the title iOS support iOS support + android utp-native support (hole punching) Jul 2, 2018
@wittjosiah
Copy link

I was able to run this in the iOS simulator on my macbook, nice work @jimpick!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants