Multipeer Connectivity in iOS
Jan 12 2021 · Video Course (22 mins) · Advanced
In this course, you'll learn how to use Multipeer Connectivity: Apple's framework for transferring data between devices with no external network.
Version
- Swift 5, iOS 14, Xcode 12


The first step to adding Multipeer Connectivity to any app is to ask for permission and tell users why it will use a local network. You'll use Info.plist for this.
Advertise a Device
2:20In order to advertise your device to others, you'll need to use a reference to a Multipeer Connectivity Session object.
Invitations
4:41Once your device is advertising that it’s available, you'll need to employ MCNearbyServiceAdvertiserDelegate to handle requests to connect to other devices.
Discovery
3:19When you have devices advertised through Multipeer Connectivity, the next step is to discover them. For that, you can use an MCNearbyServiceBrowser object.
Send Data
4:11With an MCSession on one device, you can send data. And on another, an MCSessionDelegate will receive it.
Multipeer Connectivity provides a standard UI that abstracts what can be achieved with MCNearbyServiceBrowser: MCBrowserViewController.
Who is this for?
If you need a way to communicate wirelessly with Apple devices in close proximity to each other, in a blazing fast way, and you're quite comfortable with Swift, this course is likely a good match for you. SwiftUI and Combine knowledge will be helpful: they're both used in this course, but are not essential for employing Multipeer Connectivity.
Covered concepts
- Local Networking
- MCSession
- MCNearbyServiceAdvertiser
- MCBrowserViewController
- Combine
Comments