Reputation: 16622
I want to build an app which allows me to add users and share some simple data (my and other contacts, including name, adresss, etc.) with them.
I've setup these requirements:
I would like to avoid building real native apps and searched for some tools/libraries. I found https://peerjs.com/ which sounds promising.
The sync (and even establish the first connection by sharing the peer IDs) between two peers would work only when both are online. In order to do the connnection stuff in the background my idea was to use webworkers but for iOS even webworkers are paused if safari is not running in the foreground. I could live with that limitation but maybe there is something else what I didn't considered yet?
Maybe there is even a better library or tool there for this kind of task?
Upvotes: 1
Views: 524
Reputation: 442
You might be interested in Yjs in that case. It's a web library for P2P communication based on web-sockets, where even the initial connection doesn't require a central server. It supports various protocols, for example bittorrent.
It is a promising tech which silently powers a lot of other apps.
Another semi-related technology is Trystero.
Because all of those things run in web, they should be cross-platform.
Upvotes: 0