SlideShare une entreprise Scribd logo
1  sur  14
Télécharger pour lire hors ligne
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

Contenu connexe

Tendances

Henry Been - Secure development: keeping your application secrets private
Henry Been - Secure development: keeping your application secrets privateHenry Been - Secure development: keeping your application secrets private
Henry Been - Secure development: keeping your application secrets privateHenry Been
 
Gearing up for mobile push notifications
Gearing up for mobile push notificationsGearing up for mobile push notifications
Gearing up for mobile push notificationsKeith Moore
 
Get started azure- Azure Mobile Services
Get started azure- Azure Mobile ServicesGet started azure- Azure Mobile Services
Get started azure- Azure Mobile ServicesSenthamil Selvan
 
Active Directory Single Sign-On with IBM
Active Directory Single Sign-On with IBMActive Directory Single Sign-On with IBM
Active Directory Single Sign-On with IBMVan Staub, MBA
 
End-to-end Mobile App Development (with iOS and Azure Mobile Services)
End-to-end Mobile App Development (with iOS and Azure Mobile Services)End-to-end Mobile App Development (with iOS and Azure Mobile Services)
End-to-end Mobile App Development (with iOS and Azure Mobile Services)Andri Yadi
 
Secure deployments keeping your application secrets private -duug fest
Secure deployments   keeping your application secrets private -duug festSecure deployments   keeping your application secrets private -duug fest
Secure deployments keeping your application secrets private -duug festHenry Been
 
SenchaCon 2016: Enterprise Applications, Role Based Access Controls (RBAC) an...
SenchaCon 2016: Enterprise Applications, Role Based Access Controls (RBAC) an...SenchaCon 2016: Enterprise Applications, Role Based Access Controls (RBAC) an...
SenchaCon 2016: Enterprise Applications, Role Based Access Controls (RBAC) an...Sencha
 
VSTS and VS AppCenter overview and mobile releases 2018-05-30
VSTS and VS AppCenter overview and mobile releases 2018-05-30VSTS and VS AppCenter overview and mobile releases 2018-05-30
VSTS and VS AppCenter overview and mobile releases 2018-05-30Okko Oulasvirta
 
Integrate Jenkins with S3
Integrate Jenkins with S3Integrate Jenkins with S3
Integrate Jenkins with S3devopsjourney
 
Inspect The Uninspected
Inspect The UninspectedInspect The Uninspected
Inspect The Uninspectedcgack
 
iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 06)
iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 06)iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 06)
iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 06)Jonathan Engelsma
 
Building Mobile Apps With Xamarin and Visual Studio App Center
Building Mobile Apps With Xamarin and Visual Studio App CenterBuilding Mobile Apps With Xamarin and Visual Studio App Center
Building Mobile Apps With Xamarin and Visual Studio App CenterSharePoint Saturday New Jersey
 
Android Development with Eclipse and Xamarin
Android Development with Eclipse and XamarinAndroid Development with Eclipse and Xamarin
Android Development with Eclipse and XamarinSasha Goldshtein
 
First Steps in Android Development with Eclipse and Xamarin
First Steps in Android Development with Eclipse and XamarinFirst Steps in Android Development with Eclipse and Xamarin
First Steps in Android Development with Eclipse and XamarinSasha Goldshtein
 

Tendances (19)

monkeyTalk
monkeyTalkmonkeyTalk
monkeyTalk
 
Henry Been - Secure development: keeping your application secrets private
Henry Been - Secure development: keeping your application secrets privateHenry Been - Secure development: keeping your application secrets private
Henry Been - Secure development: keeping your application secrets private
 
Gearing up for mobile push notifications
Gearing up for mobile push notificationsGearing up for mobile push notifications
Gearing up for mobile push notifications
 
Get started azure- Azure Mobile Services
Get started azure- Azure Mobile ServicesGet started azure- Azure Mobile Services
Get started azure- Azure Mobile Services
 
Active Directory Single Sign-On with IBM
Active Directory Single Sign-On with IBMActive Directory Single Sign-On with IBM
Active Directory Single Sign-On with IBM
 
Nxwebplayer Slides
Nxwebplayer SlidesNxwebplayer Slides
Nxwebplayer Slides
 
End-to-end Mobile App Development (with iOS and Azure Mobile Services)
End-to-end Mobile App Development (with iOS and Azure Mobile Services)End-to-end Mobile App Development (with iOS and Azure Mobile Services)
End-to-end Mobile App Development (with iOS and Azure Mobile Services)
 
Hello windows 10
Hello windows 10Hello windows 10
Hello windows 10
 
Secure deployments keeping your application secrets private -duug fest
Secure deployments   keeping your application secrets private -duug festSecure deployments   keeping your application secrets private -duug fest
Secure deployments keeping your application secrets private -duug fest
 
Odin Authenticator
Odin AuthenticatorOdin Authenticator
Odin Authenticator
 
SenchaCon 2016: Enterprise Applications, Role Based Access Controls (RBAC) an...
SenchaCon 2016: Enterprise Applications, Role Based Access Controls (RBAC) an...SenchaCon 2016: Enterprise Applications, Role Based Access Controls (RBAC) an...
SenchaCon 2016: Enterprise Applications, Role Based Access Controls (RBAC) an...
 
VSTS and VS AppCenter overview and mobile releases 2018-05-30
VSTS and VS AppCenter overview and mobile releases 2018-05-30VSTS and VS AppCenter overview and mobile releases 2018-05-30
VSTS and VS AppCenter overview and mobile releases 2018-05-30
 
Integrate Jenkins with S3
Integrate Jenkins with S3Integrate Jenkins with S3
Integrate Jenkins with S3
 
Inspect The Uninspected
Inspect The UninspectedInspect The Uninspected
Inspect The Uninspected
 
iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 06)
iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 06)iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 06)
iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 06)
 
Building Mobile Apps With Xamarin and Visual Studio App Center
Building Mobile Apps With Xamarin and Visual Studio App CenterBuilding Mobile Apps With Xamarin and Visual Studio App Center
Building Mobile Apps With Xamarin and Visual Studio App Center
 
Microservices
MicroservicesMicroservices
Microservices
 
Android Development with Eclipse and Xamarin
Android Development with Eclipse and XamarinAndroid Development with Eclipse and Xamarin
Android Development with Eclipse and Xamarin
 
First Steps in Android Development with Eclipse and Xamarin
First Steps in Android Development with Eclipse and XamarinFirst Steps in Android Development with Eclipse and Xamarin
First Steps in Android Development with Eclipse and Xamarin
 

Similaire à NSCoder Keynote - 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
 

Similaire à NSCoder Keynote - 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
 

Plus de Alex Rupérez

Iterando arquitecturas, creando herramientas | T3chFest
Iterando arquitecturas, creando herramientas | T3chFestIterando arquitecturas, creando herramientas | T3chFest
Iterando arquitecturas, creando herramientas | T3chFestAlex Rupérez
 
Desarrollando mogollón de apps a la vez... ¿en qué lío me he metido?
Desarrollando mogollón de apps a la vez... ¿en qué lío me he metido?Desarrollando mogollón de apps a la vez... ¿en qué lío me he metido?
Desarrollando mogollón de apps a la vez... ¿en qué lío me he metido?Alex Rupérez
 
MADBike – Destapando la seguridad de BiciMAD (T3chFest 2017)
MADBike – Destapando la seguridad de BiciMAD (T3chFest 2017)MADBike – Destapando la seguridad de BiciMAD (T3chFest 2017)
MADBike – Destapando la seguridad de BiciMAD (T3chFest 2017)Alex Rupérez
 
Gigigo Rails Workshop
Gigigo Rails WorkshopGigigo Rails Workshop
Gigigo Rails WorkshopAlex Rupérez
 
Gigigo Ruby Workshop
Gigigo Ruby WorkshopGigigo Ruby Workshop
Gigigo Ruby WorkshopAlex Rupérez
 
Magister of Entrepreneurship - Social Development
Magister of Entrepreneurship - Social DevelopmentMagister of Entrepreneurship - Social Development
Magister of Entrepreneurship - Social DevelopmentAlex Rupérez
 

Plus de Alex Rupérez (7)

Iterando arquitecturas, creando herramientas | T3chFest
Iterando arquitecturas, creando herramientas | T3chFestIterando arquitecturas, creando herramientas | T3chFest
Iterando arquitecturas, creando herramientas | T3chFest
 
Desarrollando mogollón de apps a la vez... ¿en qué lío me he metido?
Desarrollando mogollón de apps a la vez... ¿en qué lío me he metido?Desarrollando mogollón de apps a la vez... ¿en qué lío me he metido?
Desarrollando mogollón de apps a la vez... ¿en qué lío me he metido?
 
MADBike – Destapando la seguridad de BiciMAD (T3chFest 2017)
MADBike – Destapando la seguridad de BiciMAD (T3chFest 2017)MADBike – Destapando la seguridad de BiciMAD (T3chFest 2017)
MADBike – Destapando la seguridad de BiciMAD (T3chFest 2017)
 
Gigigo Rails Workshop
Gigigo Rails WorkshopGigigo Rails Workshop
Gigigo Rails Workshop
 
Gigigo Ruby Workshop
Gigigo Ruby WorkshopGigigo Ruby Workshop
Gigigo Ruby Workshop
 
iOS Sync Libraries
iOS Sync LibrariesiOS Sync Libraries
iOS Sync Libraries
 
Magister of Entrepreneurship - Social Development
Magister of Entrepreneurship - Social DevelopmentMagister of Entrepreneurship - Social Development
Magister of Entrepreneurship - Social Development
 

Dernier

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 

Dernier (20)

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 

NSCoder Keynote - 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