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

UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...UbiTrack UK
 
Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024SkyPlanner
 
OpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureOpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureEric D. Schabell
 
Introduction to Quantum Computing
Introduction to Quantum ComputingIntroduction to Quantum Computing
Introduction to Quantum ComputingGDSC PJATK
 
Spring24-Release Overview - Wellingtion User Group-1.pdf
Spring24-Release Overview - Wellingtion User Group-1.pdfSpring24-Release Overview - Wellingtion User Group-1.pdf
Spring24-Release Overview - Wellingtion User Group-1.pdfAnna Loughnan Colquhoun
 
NIST Cybersecurity Framework (CSF) 2.0 Workshop
NIST Cybersecurity Framework (CSF) 2.0 WorkshopNIST Cybersecurity Framework (CSF) 2.0 Workshop
NIST Cybersecurity Framework (CSF) 2.0 WorkshopBachir Benyammi
 
Nanopower In Semiconductor Industry.pdf
Nanopower  In Semiconductor Industry.pdfNanopower  In Semiconductor Industry.pdf
Nanopower In Semiconductor Industry.pdfPedro Manuel
 
Introduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxIntroduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxMatsuo Lab
 
UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6DianaGray10
 
Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Commit University
 
Things you didn't know you can use in your Salesforce
Things you didn't know you can use in your SalesforceThings you didn't know you can use in your Salesforce
Things you didn't know you can use in your SalesforceMartin Humpolec
 
Do we need a new standard for visualizing the invisible?
Do we need a new standard for visualizing the invisible?Do we need a new standard for visualizing the invisible?
Do we need a new standard for visualizing the invisible?SANGHEE SHIN
 
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationUsing IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationIES VE
 
Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024D Cloud Solutions
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
RAG Patterns and Vector Search in Generative AI
RAG Patterns and Vector Search in Generative AIRAG Patterns and Vector Search in Generative AI
RAG Patterns and Vector Search in Generative AIUdaiappa Ramachandran
 
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPathCommunity
 
Digital magic. A small project for controlling smart light bulbs.
Digital magic. A small project for controlling smart light bulbs.Digital magic. A small project for controlling smart light bulbs.
Digital magic. A small project for controlling smart light bulbs.francesco barbera
 
9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding TeamAdam Moalla
 
UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7DianaGray10
 

Dernier (20)

UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
 
Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024
 
OpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureOpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability Adventure
 
Introduction to Quantum Computing
Introduction to Quantum ComputingIntroduction to Quantum Computing
Introduction to Quantum Computing
 
Spring24-Release Overview - Wellingtion User Group-1.pdf
Spring24-Release Overview - Wellingtion User Group-1.pdfSpring24-Release Overview - Wellingtion User Group-1.pdf
Spring24-Release Overview - Wellingtion User Group-1.pdf
 
NIST Cybersecurity Framework (CSF) 2.0 Workshop
NIST Cybersecurity Framework (CSF) 2.0 WorkshopNIST Cybersecurity Framework (CSF) 2.0 Workshop
NIST Cybersecurity Framework (CSF) 2.0 Workshop
 
Nanopower In Semiconductor Industry.pdf
Nanopower  In Semiconductor Industry.pdfNanopower  In Semiconductor Industry.pdf
Nanopower In Semiconductor Industry.pdf
 
Introduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxIntroduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptx
 
UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6
 
Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)
 
Things you didn't know you can use in your Salesforce
Things you didn't know you can use in your SalesforceThings you didn't know you can use in your Salesforce
Things you didn't know you can use in your Salesforce
 
Do we need a new standard for visualizing the invisible?
Do we need a new standard for visualizing the invisible?Do we need a new standard for visualizing the invisible?
Do we need a new standard for visualizing the invisible?
 
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationUsing IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
 
Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
RAG Patterns and Vector Search in Generative AI
RAG Patterns and Vector Search in Generative AIRAG Patterns and Vector Search in Generative AI
RAG Patterns and Vector Search in Generative AI
 
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation Developers
 
Digital magic. A small project for controlling smart light bulbs.
Digital magic. A small project for controlling smart light bulbs.Digital magic. A small project for controlling smart light bulbs.
Digital magic. A small project for controlling smart light bulbs.
 
9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team
 
UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7
 

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