This project demonstrates the way to discover another iOS device in local network using Bonjour and establish a connection via WebSockets to transfer any kind of data. Any iOS device can be the server and the client in the same time.
You should have at least 2 iOS devices to try this sample. Both devices should start "listening" for incoming connections and discover each other over the network before they will be able to connect. Once one device is discovered by another - connection can be made and exchange can be started.
NOTE: Even in the background mode, iOS will shout down your app after a 3 minutes of activity. So if you will minimize your app, and raise later, all connections could be lost.
- Ping connections after app resigned active and cleanup the list.
- Possible crash when using UIApplication background modes.
- Peers list: swipe to disconnect.
- Activity indicator when connecting to peer (Peer status update).