MultipeerNetworking stability

Hi, i programmed an app the uses MultipeerConnectivity to connect iOS-Devices to exchange Video-Files from the camera (https://pellepepper.my.canva.site/jumpcontrol). In general the solution works fine but I have some challenges:

  • The connection is pretty stable when there are only few other devices around. It seems to become more fragile when there are more other iOS-Devices in the area
  • Testing of the App worked with several meters of distance (up to 10). In real environments of athletics venues the solution is only stable in a region of about 2 meters
  • It seems that newer iOS-Releases make the connection more unstable. Last weekend we used it with iOS 18-Devices on older hardware, what worked fine. Integrating an iOS 26 device made trouble. Working on iPhone 13 with iOS 26 is hardly not usable.

What can I do to improve stability of the connection and therefore the App. What are the metrics to look for? Is there something I can do on the code base to make to connection more stable?

Many thx Rainer

Answered by DTS Engineer in 874064022

My general advice is that you avoid Multipeer Connectivity. I explain why, and a lot more besides, in Moving from Multipeer Connectivity to Network Framework.

In real environments of athletics venues the solution is only stable in a region of about 2 meters

It sounds like you’re using it to access peer-to-peer Wi-Fi. I have three important notes on that front:

  • Multipeer Connectivity is not the only way to access peer-to-peer Wi-Fi. I talk more about that in TN3151 Choosing the right networking API.
  • If you just switch to Network framework, it might not actually help, because they use the same underlying Apple peer-to-peer Wi-Fi mechanism. OTOH, it might actually help because Network framework gives you great visibility into what’s happening on the ‘wire’ versus Multipeer Connectivity.
  • We also have Wi-Fi Aware, which is a different peer-to-peer Wi-Fi mechanism. Note that Wi-Fi Aware is just there to set up the pairing, and you do the actual networking with Network framework.

So, I encourage you to explore these options. Specifically, construct some minimal prototypes and test them in real world conditions. That’ll let you verify that the change is beneficial before you invest a significant amount of work in a new networking layer.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

My general advice is that you avoid Multipeer Connectivity. I explain why, and a lot more besides, in Moving from Multipeer Connectivity to Network Framework.

In real environments of athletics venues the solution is only stable in a region of about 2 meters

It sounds like you’re using it to access peer-to-peer Wi-Fi. I have three important notes on that front:

  • Multipeer Connectivity is not the only way to access peer-to-peer Wi-Fi. I talk more about that in TN3151 Choosing the right networking API.
  • If you just switch to Network framework, it might not actually help, because they use the same underlying Apple peer-to-peer Wi-Fi mechanism. OTOH, it might actually help because Network framework gives you great visibility into what’s happening on the ‘wire’ versus Multipeer Connectivity.
  • We also have Wi-Fi Aware, which is a different peer-to-peer Wi-Fi mechanism. Note that Wi-Fi Aware is just there to set up the pairing, and you do the actual networking with Network framework.

So, I encourage you to explore these options. Specifically, construct some minimal prototypes and test them in real world conditions. That’ll let you verify that the change is beneficial before you invest a significant amount of work in a new networking layer.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

MultipeerNetworking stability
 
 
Q