Home > front end >  Configuring Multipeer Connectivity to use a medium of connection between macOS and iOS
Configuring Multipeer Connectivity to use a medium of connection between macOS and iOS

Time:03-27

I'm using the multipeer connectivity library to establish a p2p connection between an iOS device and a macOS device. The documentation states: "In macOS and tvOS, it uses infrastructure Wi-Fi, peer-to-peer Wi-Fi, and Ethernet."

Is there a way to specify the usage of p2p wifi over infrastructure wifi? If not what are my options for a pure p2p communication between iOS and macOS (other than CoreBluetooth)?

Reference: https://developer.apple.com/documentation/multipeerconnectivity

CodePudding user response:

So here's an answer in case anyone is wondering.

Multipeerconnectivity library is very limited in scope in terms of configurability. We can't really configure it to use a certain protocol over the other and what medium to use. The best alternative I've found is to create a custom p2p communication with the Apple Network library. Reference: https://developer.apple.com/documentation/network

  • Related