SlideShare a Scribd company logo
1 of 14
Download to read offline
Multipeer Connectivity
Framework

http://alexruperez.com
@alexruperez
Multipeer Connectivity Framework
•

Provides support for discovering services
provided by nearby iOS devices using
infrastructure Wi-Fi networks, peer-to-peer Wi-Fi,
and Bluetooth personal area networks and
subsequently communicating with those services
by sending message-based data, streaming data,
and resources (such as files).

•

This connection is not Android compatible, for
Android devices you can use Wi-Fi Direct,
although it is not as fast as Multipeer.
http://alexruperez.com
@alexruperez
MCPeerID
•

The MCPeerID class represents a peer in a multipeer
session.

•

The Multipeer Connectivity framework is responsible for
creating peer objects that represent other devices. Your
app is responsible for creating a single peer object that
represents the instance of your app that is running on the
local device.

•

To create a new peer ID for the local app and associate a
display name with that ID, call initWithDisplayName:.
The peer’s name must be no longer than 63 bytes in
UTF-8 encoding.
http://alexruperez.com
@alexruperez
MCAdvertiserAssistant
•

Handles advertising, presents incoming
invitations to the user and handles users’
responses. This class should be used to provide
a user interface for handling invitations when
your app does not require programmatic control
over the invitation process.

•

Before you can advertise a service, you must
create an MCPeerID object that identifies your
app and the user to nearby devices.
http://alexruperez.com
@alexruperez
•

initWithServiceType:(NSString*) serviceType
discoveryInfo:(NSDictionary*) info session:(MCSession*)
session

•

serviceType must be 1–15 characters long and can
contain only ASCII lowercase letters, numbers, and
hyphens. Ex. @“abc-txtchat”

•

info is just extra information to be broadcasted, may be
nil.

•

Then simply start or stop the advertising.

•

For more customization check out
MCNearbyServiceAdvertiser.
http://alexruperez.com
@alexruperez
MCAdvertiserAssistantDelegate
•

Describes the methods that the delegate object
for an MCAdvertiserAssistant instance can
implement to handle advertising-related events.

•

advertiserAssitantWillPresentInvitation:
(MCAdvertiserAssistant*) advertiserAssistant

•

advertiserAssistantDidDismissInvitation:
(MCAdvertiserAssistant*) advertiserAssistant
http://alexruperez.com
@alexruperez
MCBrowserViewController
•

Presents nearby devices to the user and
enables the user to invite nearby devices to a
session. To use this class, call methods from the
underlying UIViewController class
(performSegueWithIdentifier:sender: for
storyboards or
presentViewController:animated:completion:
for nib-based views) to present and dismiss the
view controller.
http://alexruperez.com
@alexruperez
•

initWithServiceType:(NSString*) serviceType
session:(MCSession*) session

•

The maximumNumberOfPeers property
represents max peers allowed in a session,
including the local peer. The largest allowable
value (and the default) is 8.

•

The minimumNumberOfPeers property
represents min peers allowed in a session,
including the local peer. The smallest allowable
value (and the default) is 2.
http://alexruperez.com
@alexruperez
MCBrowserViewControllerDelegate
•

- (BOOL)browserViewController:
(MCBrowserViewController*) browserViewController
shouldPresentNearbyPeer:(MCPeerID*) peerID
withDiscoveryInfo:(NSDictionary*) info

•

- (void)browserViewControllerDidFinish:
(MCBrowserViewController*) browserViewController

•

- (void)browserViewControllerWasCancelled:
(MCBrowserViewController*) browserViewController
http://alexruperez.com
@alexruperez
MCNearbyServiceBrowser
•

Searches (by service type) for services offered
by nearby devices using infrastructure Wi-Fi,
peer-to-peer Wi-Fi, and Bluetooth, and provides
the ability to easily invite those devices to a
Multipeer Connectivity session (MCSession).

•

You can create a custom
MCBrowserViewController using your own
MCNearbyServiceBrowser with
initWithBrowser:session:
http://alexruperez.com
@alexruperez
MCSession
•

Enables and manages communication among all
peers in a Multipeer Connectivity session.

•

initWithPeer:(MCPeerID*) myPeerID

•

The connectedPeers property is array of all
peers that are currently connected to this
session.
http://alexruperez.com
@alexruperez
•

- (BOOL)sendData:(NSData*) data toPeers:
(NSArray*) peerIDs withMode:
(MCSessionSendDataMode) mode error:(NSError**)
error

•

- (NSProgress*)sendResourceAtURL:(NSURL*)
resourceURL withName:(NSString*) resourceName
toPeer:(MCPeerID*) peerID withCompletionHandler:
(void (^)(NSError *error))completionHandler

•

- (NSOutputStream*)startStreamWithName:
(NSString*) streamName toPeer:(MCPeerID*) peerID
error:(NSError**) error
http://alexruperez.com
@alexruperez
MCSessionSendDataMode
•

MCSessionSendDataReliable: The framework should
guarantee delivery of each message, enqueueing and
retransmitting data as needed, and ensuring in-order
delivery.

•

MCSessionSendDataUnreliable: Messages to peers
should be sent immediately without socket-level
queueing. If a message cannot be sent immediately, it
should be dropped. The order of messages is not
guaranteed. This message type should be used for data
that ceases to be relevant if delayed, such as real-time
gaming data.
http://alexruperez.com
@alexruperez
Addendum
•

alexruperez/ARMultipeerConnectivityExample

•

Multipeer Connectivity Framework Reference

•

MultipeerGroupChat

•

tonyd256/TDAudioPlayer

•

pj4533/AVCaptureMultipeerVideoDataOutput
http://alexruperez.com
@alexruperez

More Related Content

What's hot

A Django like messages framework for Tornado
A Django like messages framework for TornadoA Django like messages framework for Tornado
A Django like messages framework for TornadoChao Gao
 
Micro Web Service - Slim and JWT
Micro Web Service - Slim and JWTMicro Web Service - Slim and JWT
Micro Web Service - Slim and JWTTuyen Vuong
 
Authentication
AuthenticationAuthentication
Authenticationsoon
 
Json web token api authorization
Json web token api authorizationJson web token api authorization
Json web token api authorizationGiulio De Donato
 
Google
GoogleGoogle
Googlesoon
 
How to integrate bit coin wallet using blockchain methodology
How to integrate bit coin wallet using blockchain methodologyHow to integrate bit coin wallet using blockchain methodology
How to integrate bit coin wallet using blockchain methodologyMitosis Technology
 
JavaOne 2014 - Securing RESTful Resources with OAuth2
JavaOne 2014 - Securing RESTful Resources with OAuth2JavaOne 2014 - Securing RESTful Resources with OAuth2
JavaOne 2014 - Securing RESTful Resources with OAuth2Rodrigo Cândido da Silva
 

What's hot (8)

A Django like messages framework for Tornado
A Django like messages framework for TornadoA Django like messages framework for Tornado
A Django like messages framework for Tornado
 
Micro Web Service - Slim and JWT
Micro Web Service - Slim and JWTMicro Web Service - Slim and JWT
Micro Web Service - Slim and JWT
 
Authentication
AuthenticationAuthentication
Authentication
 
Json web token api authorization
Json web token api authorizationJson web token api authorization
Json web token api authorization
 
Google
GoogleGoogle
Google
 
How to integrate bit coin wallet using blockchain methodology
How to integrate bit coin wallet using blockchain methodologyHow to integrate bit coin wallet using blockchain methodology
How to integrate bit coin wallet using blockchain methodology
 
Client side
Client sideClient side
Client side
 
JavaOne 2014 - Securing RESTful Resources with OAuth2
JavaOne 2014 - Securing RESTful Resources with OAuth2JavaOne 2014 - Securing RESTful Resources with OAuth2
JavaOne 2014 - Securing RESTful Resources with OAuth2
 

Similar to Multipeer Connectivity Framework

DEVNET-1124 Cisco pxGrid: A New Architecture for Security Platform Integration
DEVNET-1124	Cisco pxGrid: A New Architecture for Security Platform IntegrationDEVNET-1124	Cisco pxGrid: A New Architecture for Security Platform Integration
DEVNET-1124 Cisco pxGrid: A New Architecture for Security Platform IntegrationCisco DevNet
 
2015.04.23 Azure Mobile Services
2015.04.23 Azure Mobile Services2015.04.23 Azure Mobile Services
2015.04.23 Azure Mobile ServicesMarco Parenzan
 
MongoDB.local Berlin: App development in a Serverless World
MongoDB.local Berlin: App development in a Serverless WorldMongoDB.local Berlin: App development in a Serverless World
MongoDB.local Berlin: App development in a Serverless WorldMongoDB
 
Serverless Geospatial Mobile Apps with AWS
Serverless Geospatial Mobile Apps with AWSServerless Geospatial Mobile Apps with AWS
Serverless Geospatial Mobile Apps with AWSAmazon Web Services
 
Realtime web experience with signalR
Realtime web experience with signalRRealtime web experience with signalR
Realtime web experience with signalRRan Wahle
 
Real time Communication with Signalr (Android Client)
Real time Communication with Signalr (Android Client)Real time Communication with Signalr (Android Client)
Real time Communication with Signalr (Android Client)Deepak Gupta
 
Serverless Geospatial Mobile Apps with AWS
Serverless Geospatial Mobile Apps with AWSServerless Geospatial Mobile Apps with AWS
Serverless Geospatial Mobile Apps with AWSAmazon Web Services
 
DEVNET-1010 Using Cisco pxGrid for Security Platform Integration
DEVNET-1010	Using Cisco pxGrid for Security Platform IntegrationDEVNET-1010	Using Cisco pxGrid for Security Platform Integration
DEVNET-1010 Using Cisco pxGrid for Security Platform IntegrationCisco DevNet
 
MongoDB.local Atlanta: Introduction to Serverless MongoDB
MongoDB.local Atlanta: Introduction to Serverless MongoDBMongoDB.local Atlanta: Introduction to Serverless MongoDB
MongoDB.local Atlanta: Introduction to Serverless MongoDBMongoDB
 
How to measure your security response readiness?
How to measure your security response readiness?How to measure your security response readiness?
How to measure your security response readiness?Tomasz Jakubowski
 
AWS_IoT_Device_Management_Workshop.pptx
AWS_IoT_Device_Management_Workshop.pptxAWS_IoT_Device_Management_Workshop.pptx
AWS_IoT_Device_Management_Workshop.pptxhawkheadtrolley
 
Skype for business mobility
Skype for business mobilitySkype for business mobility
Skype for business mobilityFabrizio Volpe
 
Hyperleger Composer Architecure Deep Dive
Hyperleger Composer Architecure Deep DiveHyperleger Composer Architecure Deep Dive
Hyperleger Composer Architecure Deep DiveDan Selman
 
Cloud Powered Mobile Apps with Azure
Cloud Powered Mobile Apps  with AzureCloud Powered Mobile Apps  with Azure
Cloud Powered Mobile Apps with AzureKris Wagner
 
Terence Barr - beyond smartphones - 24mai2011
Terence Barr  - beyond smartphones - 24mai2011Terence Barr  - beyond smartphones - 24mai2011
Terence Barr - beyond smartphones - 24mai2011Agora Group
 
Cloud Powered Mobile Apps with Azure
Cloud Powered Mobile Apps with AzureCloud Powered Mobile Apps with Azure
Cloud Powered Mobile Apps with AzureKen Cenerelli
 
Building Modern Distributed Applications in Go with Service Weaver
Building Modern Distributed Applications in Go with Service WeaverBuilding Modern Distributed Applications in Go with Service Weaver
Building Modern Distributed Applications in Go with Service WeaverShiju Varghese
 

Similar to Multipeer Connectivity Framework (20)

DEVNET-1124 Cisco pxGrid: A New Architecture for Security Platform Integration
DEVNET-1124	Cisco pxGrid: A New Architecture for Security Platform IntegrationDEVNET-1124	Cisco pxGrid: A New Architecture for Security Platform Integration
DEVNET-1124 Cisco pxGrid: A New Architecture for Security Platform Integration
 
2015.04.23 Azure Mobile Services
2015.04.23 Azure Mobile Services2015.04.23 Azure Mobile Services
2015.04.23 Azure Mobile Services
 
MongoDB.local Berlin: App development in a Serverless World
MongoDB.local Berlin: App development in a Serverless WorldMongoDB.local Berlin: App development in a Serverless World
MongoDB.local Berlin: App development in a Serverless World
 
Serverless Geospatial Mobile Apps with AWS
Serverless Geospatial Mobile Apps with AWSServerless Geospatial Mobile Apps with AWS
Serverless Geospatial Mobile Apps with AWS
 
Getting Started with AWS IoT
Getting Started with AWS IoTGetting Started with AWS IoT
Getting Started with AWS IoT
 
Realtime web experience with signalR
Realtime web experience with signalRRealtime web experience with signalR
Realtime web experience with signalR
 
Real time Communication with Signalr (Android Client)
Real time Communication with Signalr (Android Client)Real time Communication with Signalr (Android Client)
Real time Communication with Signalr (Android Client)
 
Serverless Geospatial Mobile Apps with AWS
Serverless Geospatial Mobile Apps with AWSServerless Geospatial Mobile Apps with AWS
Serverless Geospatial Mobile Apps with AWS
 
Building mobile apps on aws
Building mobile apps on awsBuilding mobile apps on aws
Building mobile apps on aws
 
Building mobile apps on AWS
Building mobile apps on AWSBuilding mobile apps on AWS
Building mobile apps on AWS
 
DEVNET-1010 Using Cisco pxGrid for Security Platform Integration
DEVNET-1010	Using Cisco pxGrid for Security Platform IntegrationDEVNET-1010	Using Cisco pxGrid for Security Platform Integration
DEVNET-1010 Using Cisco pxGrid for Security Platform Integration
 
MongoDB.local Atlanta: Introduction to Serverless MongoDB
MongoDB.local Atlanta: Introduction to Serverless MongoDBMongoDB.local Atlanta: Introduction to Serverless MongoDB
MongoDB.local Atlanta: Introduction to Serverless MongoDB
 
How to measure your security response readiness?
How to measure your security response readiness?How to measure your security response readiness?
How to measure your security response readiness?
 
AWS_IoT_Device_Management_Workshop.pptx
AWS_IoT_Device_Management_Workshop.pptxAWS_IoT_Device_Management_Workshop.pptx
AWS_IoT_Device_Management_Workshop.pptx
 
Skype for business mobility
Skype for business mobilitySkype for business mobility
Skype for business mobility
 
Hyperleger Composer Architecure Deep Dive
Hyperleger Composer Architecure Deep DiveHyperleger Composer Architecure Deep Dive
Hyperleger Composer Architecure Deep Dive
 
Cloud Powered Mobile Apps with Azure
Cloud Powered Mobile Apps  with AzureCloud Powered Mobile Apps  with Azure
Cloud Powered Mobile Apps with Azure
 
Terence Barr - beyond smartphones - 24mai2011
Terence Barr  - beyond smartphones - 24mai2011Terence Barr  - beyond smartphones - 24mai2011
Terence Barr - beyond smartphones - 24mai2011
 
Cloud Powered Mobile Apps with Azure
Cloud Powered Mobile Apps with AzureCloud Powered Mobile Apps with Azure
Cloud Powered Mobile Apps with Azure
 
Building Modern Distributed Applications in Go with Service Weaver
Building Modern Distributed Applications in Go with Service WeaverBuilding Modern Distributed Applications in Go with Service Weaver
Building Modern Distributed Applications in Go with Service Weaver
 

More from Jorge Ortiz

Fiscalidad en el app store 2014
Fiscalidad en el app store 2014Fiscalidad en el app store 2014
Fiscalidad en el app store 2014Jorge Ortiz
 
Fiscalidad en el app store 2014
Fiscalidad en el app store 2014Fiscalidad en el app store 2014
Fiscalidad en el app store 2014Jorge Ortiz
 
Automatización de interfaces e introducción a bdd
Automatización de interfaces e introducción a bddAutomatización de interfaces e introducción a bdd
Automatización de interfaces e introducción a bddJorge Ortiz
 
Ui design patterns
Ui design patternsUi design patterns
Ui design patternsJorge Ortiz
 
¿Cuánto cuesta una app?
¿Cuánto cuesta una app?¿Cuánto cuesta una app?
¿Cuánto cuesta una app?Jorge Ortiz
 
Aplicaciones para iphone accesibles
Aplicaciones para iphone accesiblesAplicaciones para iphone accesibles
Aplicaciones para iphone accesiblesJorge Ortiz
 
Introduccion a core plot
Introduccion a core plotIntroduccion a core plot
Introduccion a core plotJorge Ortiz
 

More from Jorge Ortiz (12)

Fiscalidad en el app store 2014
Fiscalidad en el app store 2014Fiscalidad en el app store 2014
Fiscalidad en el app store 2014
 
Fiscalidad en el app store 2014
Fiscalidad en el app store 2014Fiscalidad en el app store 2014
Fiscalidad en el app store 2014
 
Automatización de interfaces e introducción a bdd
Automatización de interfaces e introducción a bddAutomatización de interfaces e introducción a bdd
Automatización de interfaces e introducción a bdd
 
Ui design patterns
Ui design patternsUi design patterns
Ui design patterns
 
iBeacons
iBeaconsiBeacons
iBeacons
 
Kata tdd
Kata tddKata tdd
Kata tdd
 
Autolayout
AutolayoutAutolayout
Autolayout
 
Crashlitycs
CrashlitycsCrashlitycs
Crashlitycs
 
¿Cuánto cuesta una app?
¿Cuánto cuesta una app?¿Cuánto cuesta una app?
¿Cuánto cuesta una app?
 
Runtime
RuntimeRuntime
Runtime
 
Aplicaciones para iphone accesibles
Aplicaciones para iphone accesiblesAplicaciones para iphone accesibles
Aplicaciones para iphone accesibles
 
Introduccion a core plot
Introduccion a core plotIntroduccion a core plot
Introduccion a core plot
 

Recently uploaded

Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 

Recently uploaded (20)

Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 

Multipeer Connectivity Framework

  • 2. Multipeer Connectivity Framework • Provides support for discovering services provided by nearby iOS devices using infrastructure Wi-Fi networks, peer-to-peer Wi-Fi, and Bluetooth personal area networks and subsequently communicating with those services by sending message-based data, streaming data, and resources (such as files). • This connection is not Android compatible, for Android devices you can use Wi-Fi Direct, although it is not as fast as Multipeer. http://alexruperez.com @alexruperez
  • 3. MCPeerID • The MCPeerID class represents a peer in a multipeer session. • The Multipeer Connectivity framework is responsible for creating peer objects that represent other devices. Your app is responsible for creating a single peer object that represents the instance of your app that is running on the local device. • To create a new peer ID for the local app and associate a display name with that ID, call initWithDisplayName:. The peer’s name must be no longer than 63 bytes in UTF-8 encoding. http://alexruperez.com @alexruperez
  • 4. MCAdvertiserAssistant • Handles advertising, presents incoming invitations to the user and handles users’ responses. This class should be used to provide a user interface for handling invitations when your app does not require programmatic control over the invitation process. • Before you can advertise a service, you must create an MCPeerID object that identifies your app and the user to nearby devices. http://alexruperez.com @alexruperez
  • 5. • initWithServiceType:(NSString*) serviceType discoveryInfo:(NSDictionary*) info session:(MCSession*) session • serviceType must be 1–15 characters long and can contain only ASCII lowercase letters, numbers, and hyphens. Ex. @“abc-txtchat” • info is just extra information to be broadcasted, may be nil. • Then simply start or stop the advertising. • For more customization check out MCNearbyServiceAdvertiser. http://alexruperez.com @alexruperez
  • 6. MCAdvertiserAssistantDelegate • Describes the methods that the delegate object for an MCAdvertiserAssistant instance can implement to handle advertising-related events. • advertiserAssitantWillPresentInvitation: (MCAdvertiserAssistant*) advertiserAssistant • advertiserAssistantDidDismissInvitation: (MCAdvertiserAssistant*) advertiserAssistant http://alexruperez.com @alexruperez
  • 7. MCBrowserViewController • Presents nearby devices to the user and enables the user to invite nearby devices to a session. To use this class, call methods from the underlying UIViewController class (performSegueWithIdentifier:sender: for storyboards or presentViewController:animated:completion: for nib-based views) to present and dismiss the view controller. http://alexruperez.com @alexruperez
  • 8. • initWithServiceType:(NSString*) serviceType session:(MCSession*) session • The maximumNumberOfPeers property represents max peers allowed in a session, including the local peer. The largest allowable value (and the default) is 8. • The minimumNumberOfPeers property represents min peers allowed in a session, including the local peer. The smallest allowable value (and the default) is 2. http://alexruperez.com @alexruperez
  • 9. MCBrowserViewControllerDelegate • - (BOOL)browserViewController: (MCBrowserViewController*) browserViewController shouldPresentNearbyPeer:(MCPeerID*) peerID withDiscoveryInfo:(NSDictionary*) info • - (void)browserViewControllerDidFinish: (MCBrowserViewController*) browserViewController • - (void)browserViewControllerWasCancelled: (MCBrowserViewController*) browserViewController http://alexruperez.com @alexruperez
  • 10. MCNearbyServiceBrowser • Searches (by service type) for services offered by nearby devices using infrastructure Wi-Fi, peer-to-peer Wi-Fi, and Bluetooth, and provides the ability to easily invite those devices to a Multipeer Connectivity session (MCSession). • You can create a custom MCBrowserViewController using your own MCNearbyServiceBrowser with initWithBrowser:session: http://alexruperez.com @alexruperez
  • 11. MCSession • Enables and manages communication among all peers in a Multipeer Connectivity session. • initWithPeer:(MCPeerID*) myPeerID • The connectedPeers property is array of all peers that are currently connected to this session. http://alexruperez.com @alexruperez
  • 12. • - (BOOL)sendData:(NSData*) data toPeers: (NSArray*) peerIDs withMode: (MCSessionSendDataMode) mode error:(NSError**) error • - (NSProgress*)sendResourceAtURL:(NSURL*) resourceURL withName:(NSString*) resourceName toPeer:(MCPeerID*) peerID withCompletionHandler: (void (^)(NSError *error))completionHandler • - (NSOutputStream*)startStreamWithName: (NSString*) streamName toPeer:(MCPeerID*) peerID error:(NSError**) error http://alexruperez.com @alexruperez
  • 13. MCSessionSendDataMode • MCSessionSendDataReliable: The framework should guarantee delivery of each message, enqueueing and retransmitting data as needed, and ensuring in-order delivery. • MCSessionSendDataUnreliable: Messages to peers should be sent immediately without socket-level queueing. If a message cannot be sent immediately, it should be dropped. The order of messages is not guaranteed. This message type should be used for data that ceases to be relevant if delayed, such as real-time gaming data. http://alexruperez.com @alexruperez
  • 14. Addendum • alexruperez/ARMultipeerConnectivityExample • Multipeer Connectivity Framework Reference • MultipeerGroupChat • tonyd256/TDAudioPlayer • pj4533/AVCaptureMultipeerVideoDataOutput http://alexruperez.com @alexruperez