NSurl-Multipeer or Network?

I am developing an app and need to feed text fields-label fields with data from one ipad to another ipad using wi fi, what is the best aproach to do this?

Replies

You should try the Multipeer Connectivity framework: https://developer.apple.com/documentation/multipeerconnectivity

Thanks.

NSurl-Multipeer or Network?

… what is the best aproach to do this?

As always, it depends. I’ve found that Multipeer Connectivity (MPC) works best when its architecture and your app’s network architecture are aligned. The defining factor of MPC is that it’s multipeer, that is, any peer can communicate with any other peer. If that’s how your app is structured, MPC works well.

However, in my experience a lot of apps have an asymmetric network architecture, that is, one of the peers acts as a server and all the other peers are clients that connect to that server. If your app is structured that way then MPC isn’t a great match, and you’re better off using a standard networking API.

Prior to iOS 12 and friends this presented some problems, because all the standard networking APIs had their various drawbacks. iOS 12 fixes that with the introduction of the Network framework, which smooths over a lot of the bumps inherent to our older networking APIs.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"