I'm trying to create an via iOS7 multipeer connnectivity where:
Browser1 can see Advertiser1 and Advertiser2
Browser1 sends an invite to Advertiser1 and is approved
Browser1 sends an invite to Advertiser2 and is approved
Browser1 can send messages to Advertiser1 and Advertiser2 separately
All the examples I've seen show the creation of a single MCSession when the MCNearbyServiceAdvertiser and MCNearbyServiceBrowser are initialized.
My question is: it it possible to have an array to maintain multiple sessions between groups of devices? If so, where should I be creating the new MCSession objects?
The Apple sample application for the MCMultipeerConnectivity framework contains the use-case you describe.
They create a wrapper class to handle the MCSession, and each MCSession maintains an array of connected MCPeerIDs.
Source: https://developer.apple.com/library/ios/samplecode/MultipeerGroupChat/Introduction/Intro.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With