In the Part 1 of this series we discussed how we can do multipeer connectivity using the BrowserViewController.
In this blog we will discuss how we can achieve the same programatically, you can also call it programmatic discovery. Doing this Programatically gives us:
In this blog we will discuss how we can achieve the same programatically, you can also call it programmatic discovery. Doing this Programatically gives us:
- Flexibility
- Sending and Accepting Invitations Programmatically.
- Build a custom UI for discovery.
So if we are going to things manually, than we should know the classes involved in the process. All the classes which are related to the Multipeer Connectivity are available in the "MultipeerConnectivity.framework".
Add the framework in the project and you can see the list of classes available in the framework. Out of all the classes which will interest you to start doing things are:
- MCNearbyServiceAdvertiser
- MCNearbyServiceBrowser
- MCPeerID
- MCSession