Here’s an open source Swift library that simplifies usage of the MultipeerConnectivity framework called PeerKit from JP Simard.
Peerkit greatly simplifies finding and connecting to peers, and sending/receiving data and more.
You can find PeerKit on Github here.
You can also find a simple example card game that uses PeerKit on Github here.