Search code examples
iphonexmppp2pbonjouriphone-sdk-3.2

Peer-to-Peer (w/ iPhones)?


Is it possible to have your app accept "ALL" Peer-to-Peer connections, say via settings?

I prefer the option of allowing users to "always accept bonjour connections for myApp, automatically" or "accept bonjour connections each time". I prefer not to have my app ask "Do you want to accept a connection" each time the user is using my app.

Or is there a way around this given my scenario (e.g. XMPP)? I need my app to pass over a small amount of data, just a string or string with an image and then disconnect forever. I assume to do this requires both apps to be running and on the same network, correct?

What I am trying to avoid is the ugly blue call to action pop-ups, "Join network", "Accept connection", etc...

TIA


Solution

  • Check out GameKit, it provides simple api for p2p over wifi and bluetooth. There's even sample code in the iOS Dev Center.