Bridging Apps with iOS Multipeer Connectivity
summary
A basic Tic‑Tac‑Toe app connects two iOS devices using MultipeerConnectivity: it uses MCSession, MCNearbyServiceAdvertiser and MCNearbyServiceBrowser, encodes game moves as Codable JSON and persists MCPeerID stored with NSKeyedArchiver so identities remain consistent. The session model limits direct peers to 8-device session limit; the demo works reliably for two phones, supports sendResource for images, but streaming is unimplemented and backgrounding disconnects sessions requiring manual re‑establishment and lots of delegate debugging.
AI-written summary · about
chapters (19)
- 0:00Introduction to speaker
- 1:04Why use Multipeer Connectivity
- 3:11Use cases for Multipeer
- 3:55Key framework concepts
- 5:46Setting up the app
- 7:14Player model and session
- 9:19Delegates and setup
- 10:50App states and UI
- 11:34Finding peers with browser
- 12:15Inviting peers to session
- 12:59Session delegate and connection
- 13:21Transferring data between peers
- 14:46Sending and receiving messages
- 17:17Game logic and Tic Tac Toe
- 19:04Sending game state updates
- 19:46Live demo of Tic Tac Toe
- 20:49Challenges with Multipeer
- 21:30Debugging difficulties
- 22:13Future improvements
related talks
32mThe Story of an App and a Hidden Gem of iOS
37mSynchronized iPhones, Again!
30mIt Just (Net)works: The Truth About iOS 7's Multipeer Connectivity Framework
31mEverything's better with friends
09mWWDC 2018 Aleksey Novicov
23mWhen one device is not enough
29mControlling Bluetooth Mesh Networks with Swift Applications
53mSharePlay and Other Ways to Connect iOS Users to Each Other
