https://github.com/pinarol/multipeerbusinesscard
A show case for Apple's Multipeer Connectivity API
https://github.com/pinarol/multipeerbusinesscard
ios multipeer-connectivity multipeerconnectivity multipeerconnectivity-framework nearby-interaction swift
Last synced: 4 months ago
JSON representation
A show case for Apple's Multipeer Connectivity API
- Host: GitHub
- URL: https://github.com/pinarol/multipeerbusinesscard
- Owner: pinarol
- Created: 2024-08-01T07:42:22.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-25T08:03:16.000Z (over 1 year ago)
- Last Synced: 2025-04-06T16:06:24.311Z (about 1 year ago)
- Topics: ios, multipeer-connectivity, multipeerconnectivity, multipeerconnectivity-framework, nearby-interaction, swift
- Language: Swift
- Homepage:
- Size: 18.1 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# iOS Multipeer Connectivity Example Project
This is an example project that demonstrates the usage of [Multipeer Connectivity](https://developer.apple.com/documentation/multipeerconnectivity) framework.
The app discovers other peers, invites them into a sharing session and then peers share their business cards with each other.

### Key insights
- Only one peer should connect to the other peer, not both. That's why only one of them accepts the invitation. Otherwise connection is unreliable and often lost. Unfortunately this is not explained well in the docs.
- The sessions can have max of 8 peers. You can discover more but can't share data with more than 8 device at a time.
- The system caches some of the devices it has discovered before. This causes `MCNearbyServiceBrowser` to find offline devices. And there's no way of clearing that cache unfortunately. They just disappear on their own after a while.