SlideShare a Scribd company logo
MILAN november 28th/29th, 2014 
Francesco Novelli 
Bluetooth 4.0 and iBeacons in your 
iOS app 
francesco.nove@gmail.com - RunCode 
@if9 
runcode.it
MILAN november 28th/29th, 2014 – Francesco Novelli 
Chi sono? 
1. Appassionato di tecnologia! 
2. Freelance! 
3. iOS Developer 
4. Blogger per devApp.it 
5. Ex Scrittore di libri 
6. Ex Web Developer
MILAN november 28th/29th, 2014 – Francesco Novelli 
Thanks to: 
blinkar 
http://blinkar.it
MILAN november 28th/29th, 2014 – Francesco Novelli 
Agenda: 
• Bluetooth 4.0 
• iBeacons 
• Beacons alternatives 
• iOS 7…7.1….8!
MILAN november 28th/29th, 2014 – Francesco Novelli 
Bluetooth 4.0: cos’è? 
• BLE: Bluetooth Low 
Energy 
• Standard, niente draft! 
(dal 2010) 
• Chip diverso da 3.0 e 
non retro compatibile 
• Dual Chip Device
MILAN november 28th/29th, 2014 – Francesco Novelli 
LOW 
ENERGY!!!!
MILAN november 28th/29th, 2014 – Francesco Novelli 
Bluetooth 4.0: Le novità “minori” 
• Niente abbinamenti, accoppiamenti, PIN, attese 
• Advertising continuo (se acceso…) 
• Low energy 
MIN 0.01 - MAX 0.5 
Old Bluetooth 1 
• Meno Range (50m vs 100m) 
• Meno Throughput (0.27Mbit/s vs 2.1 Mbit/s) 
• Meno Latency (6ms vs 100ms)
MILAN november 28th/29th, 2014 – Francesco Novelli 
Bluetooth 4.0: A cosa non serve 
• Auricolari 
• Scambio dati 
• Cuffie 
• … 
• e quindi??
MILAN november 28th/29th, 2014 – Francesco Novelli 
Bluetooth 4.0: A cosa serve 
• IoT Internet of Things 
• Orologi (Apple Watch, Android Wear, Pebble) 
• Sport e device fitness 
• Healtcare 
• Security 
• Proxymity 
• Automation 
• Everything!
MILAN november 28th/29th, 2014 – Francesco Novelli 
Bluetooth 4.0: Profili di utilizzo 
• GATT: is.gd/blegatt 
• Da leggere per 
developer 
• Da leggere per ogni 
hardware makers 
• Adattare il device BLE 
con i profili
MILAN november 28th/29th, 2014 – Francesco Novelli 
Bluetooth 4.0 e iOS 
• CoreBluetooth 
• iOS e Mac OS X 
• Bluetooth ad alto livello
MILAN november 28th/29th, 2014 – Francesco Novelli 
Bluetooth 4.0 e iOS 
• CBCentralManager: 
• CBPeripheral: device bluetooth 
• CBService: servizi del device 
• CBCharacteristic: informazioni del servizio
MILAN november 28th/29th, 2014 – Francesco Novelli 
Bluetooth 4.0 e iOS 
CBCentralManager: 
CBPeripheral 
CBService 
CBCharacteristic 
X 
123
MILAN november 28th/29th, 2014 – Francesco Novelli 
DEMO
MILAN november 28th/29th, 2014 – Francesco Novelli 
Bluetooth 4.0 e iOS 
• iPhone 4s + 
• Mac 
Thanks to theapplelounge.com
MILAN november 28th/29th, 2014 – Francesco Novelli 
iBeacon 
• Cos’è? 
• Come funziona? 
• Dove si trova? 
• Quanto costa? 
• Come lo uso?
MILAN november 28th/29th, 2014 – Francesco Novelli 
iBeacon 
iBeacon, a new class of low-powered, low-cost 
transmitters that can notify nearby iOS 7 
devices of their presence, provides apps a whole 
new level of location awareness, such as trail 
markers in a park, exhibits in a museum, or 
product displays in stores.
MILAN november 28th/29th, 2014 – Francesco Novelli 
iBeacon: notify…what? 
• UDID (Hex ID) 
• Major (Int) 
• Minor (Int) 
• … 
• Sempre! 
• A chiunque, in broadcasting
MILAN november 28th/29th, 2014 – Francesco Novelli 
iBeacon: Sample 
• UUDID: E2C56DB5-DFFB-48D2-B060-D0F5A71096E0 
Museo Uffizi 
• Major: int 2 
Piano 2 
• Minor: int 13 
Quadro 13 
• quindi… 
• sei nel Museo al secondo piano davanti al quadro 13. 
propongo audio guida per quel quadro.
MILAN november 28th/29th, 2014 – Francesco Novelli 
iBeacon: cos’è fisicamente?
MILAN november 28th/29th, 2014 – Francesco Novelli 
iBeacon da iDevice 
• CoreBluetooth.framework 
(AirLocate sample code) 
_peripheralManager = ! 
[[CBPeripheralManager alloc] initWithDelegate:self 
queue:dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0)]; 
NSDictionary *peripheralData = nil;! 
if(_uuid && _major && _minor)! 
{! 
CLBeaconRegion *region = ! 
[[CLBeaconRegion alloc] initWithProximityUUID:_uuid ! 
major:[_major shortValue] ! 
minor:[_minor shortValue] ! 
identifier:@"com.apple.AirLocate"];! 
peripheralData = [region peripheralDataWithMeasuredPower:_power];! 
} 
[_peripheralManager startAdvertising:peripheralData];
MILAN november 28th/29th, 2014 – Francesco Novelli 
iBeacon: Gli altri
MILAN november 28th/29th, 2014 – Francesco Novelli 
iBeacon: Estimote 
• Largamente apprezzati 
• Versione stickers (accelerometro e 
temperatura) 
• Custom SDK 
• Android SDK 
• Costo elevato
MILAN november 28th/29th, 2014 – Francesco Novelli 
iBeacon: Gimbal 
• Qualcomm! 
• Prezzo basso 
• Programmabili via iPhone 
• SDK potenziato (non obbligatorio) 
• Controllo via web (con SDK proprietario) 
• Android SDK 
• Consumo batteria da rivedere 
• Versione Tag o Device
MILAN november 28th/29th, 2014 – Francesco Novelli 
iBeacon: Consumi 
http://is.gd/ibeaconcomp
MILAN november 28th/29th, 2014 – Francesco Novelli 
iBeacon: Come lo uso? 
NOTIFY MONITORING
MILAN november 28th/29th, 2014 – Francesco Novelli
MILAN november 28th/29th, 2014 – Francesco Novelli 
iBeacon: Notify 
• CLLocationManager e delegate 
• Metodo delegate chiamato ad ogni entrata o 
uscita da una CLBeaconRegion (campo 
iBeacon) 
• Disponibile anche ad app in background 
• Si può osservare un UUID o una iBeacon 
(UUID + Major + Minor)
MILAN november 28th/29th, 2014 – Francesco Novelli 
iBeacon: Notify 
_locationManager = [[CLLocationManager alloc] init];! 
_locationManager.delegate = self;! 
! 
CLBeaconRegion *region = nil;! 
_uuid = [[NSUUID alloc] initWithUUIDString:@“E2C56DB5- 
DFFB-48D2-B060-D0F5A71096E0"];! 
region = ! 
[[CLBeaconRegion alloc] initWithProximityUUID:_uuid! 
identifier:@"com.apple.AirLocate"];! 
region.notifyOnEntry = YES;! 
region.notifyOnExit = YES;! 
region.notifyEntryStateOnDisplay = YES;! 
! 
[_locationManager startMonitoringForRegion:region];
MILAN november 28th/29th, 2014 – Francesco Novelli 
iBeacon: Notify delegate 
- (void)locationManager:(CLLocationManager *)manager ! 
didEnterRegion:(CLRegion *)region; 
- (void)locationManager:(CLLocationManager *)manager! 
didExitRegion:(CLRegion *)region; 
- (void)locationManager:(CLLocationManager *)manager! 
didDetermineState:(CLRegionState)state! 
forRegion:(CLRegion *)region;!
MILAN november 28th/29th, 2014 – Francesco Novelli 
iBeacon: Notify, quando? 
• Location awareness push notification 
• Interattività dell’app 
• Pagamenti
MILAN november 28th/29th, 2014 – Francesco Novelli 
iBeacon: Monitoring 
• CLLocationManager e delegate 
• Metodo del delegate invocato ogni secondo (se 
ci sono 1 o più beacon) 
• Array di beacons
MILAN november 28th/29th, 2014 – Francesco Novelli 
iBeacon: Monitoring 
_locationManager = [[CLLocationManager alloc] init];! 
_locationManager.delegate = self;! 
! 
CLBeaconRegion *region = nil;! 
_uuid = ! 
[[NSUUID alloc] initWithUUIDString:@“E2C56DB5-DFFB-48D2-B060- 
D0F5A71096E0"];! 
region = [[CLBeaconRegion alloc] initWithProximityUUID:_uuid 
identifier:@"com.apple.AirLocate"];! 
[_locationManager startRangingBeaconsInRegion:region];! 
!! 
- (void)locationManager:(CLLocationManager *)manager! 
didRangeBeacons:(NSArray *)beacons! 
inRegion:(CLBeaconRegion *)region {! 
!! 
NSLog(@"Major: %@, Minor: %@, Acc: %.2fm %li", beacon.major, 
beacon.minor, beacon.accuracy, beacon.proximity);! 
! 
}
MILAN november 28th/29th, 2014 – Francesco Novelli 
iBeacon: Monitoring, quando? 
• Geofencing al chiuso 
• Elencare beacons vicini 
• Ottenere le distanza da un beacon 
• Visualizzare informazioni con app aperta
MILAN november 28th/29th, 2014 – Francesco Novelli 
iBeacon: iOS Roadmap 
• 7.0 Introduzione 
• 7.1 Notify con app killate 
Velocità maggiore per le notifiche 
• 8.0 Continuity Icon
MILAN november 28th/29th, 2014 – Francesco Novelli 
iBeacon: Case history 
• MLB 
• Virgin 
• Apple Store 
• Musei Palazzo Farnese 
• Nazioni unite 
• Parchi floreali 
• Caccia al tesoro 
• …
MILAN november 28th/29th, 2014 – Francesco Novelli 
iBeacon: Android 
• Android 4.3+ (e.g. Samsung Galaxy S3/S4/S4 
Mini, Samsung Galaxy Note 2/3, HTC One, 
Google/LG Nexus 7 2013 version/Nexus 4/ 
Nexus 5, HTC Butterfly, OnePlus One) 
• SDK produttori (Gimbal, Estimote, etc) 
• AltBeacon Project
MILAN november 28th/29th, 2014 – Francesco Novelli 
iBeacon: Resources 
• iBeacon Bible 
• developer.apple.com/ibeacon 
• WWDC 2014 Session 307 – What’s New In 
Core Location 
• AirLocate Sample Code
MILAN november 28th/29th, 2014 
Thanks 
Francesco Novelli 
Bluetooth 4.0 and iBeacons in your 
iOS app 
francesco.nove@gmail.com - RunCode 
@if9 
runcode.it

More Related Content

Similar to Bluetooth 4.0 and iBeacons in your iOS [Codemotion Milan 2014]

Mettere l' IoT in Cloud con FIWARE - Massimo Vecchio, Attilio Broglio - Codem...
Mettere l' IoT in Cloud con FIWARE - Massimo Vecchio, Attilio Broglio - Codem...Mettere l' IoT in Cloud con FIWARE - Massimo Vecchio, Attilio Broglio - Codem...
Mettere l' IoT in Cloud con FIWARE - Massimo Vecchio, Attilio Broglio - Codem...
Codemotion
 
The Continuous Delivery Value - Codemotion Milano 2014
The Continuous Delivery Value - Codemotion Milano 2014The Continuous Delivery Value - Codemotion Milano 2014
The Continuous Delivery Value - Codemotion Milano 2014
David Funaro
 
Post password era - Bernard Toplak, OWASP Croatia Meetup 2016
Post password era - Bernard Toplak, OWASP Croatia Meetup 2016Post password era - Bernard Toplak, OWASP Croatia Meetup 2016
Post password era - Bernard Toplak, OWASP Croatia Meetup 2016
Bernard Toplak
 
FIWARE Accelerator Programme: 80 Milion Euro for Start-Ups and SMEs
FIWARE Accelerator Programme: 80 Milion Euro for Start-Ups and SMEsFIWARE Accelerator Programme: 80 Milion Euro for Start-Ups and SMEs
FIWARE Accelerator Programme: 80 Milion Euro for Start-Ups and SMEs
Codemotion
 
Sviluppare in cloud con M.E.A.N.: il caso Crowdcore
Sviluppare in cloud con M.E.A.N.: il caso CrowdcoreSviluppare in cloud con M.E.A.N.: il caso Crowdcore
Sviluppare in cloud con M.E.A.N.: il caso Crowdcore
ENTER S.r.l.
 
Backend as a Service: Parse
Backend as a Service: ParseBackend as a Service: Parse
Backend as a Service: Parse
Maurizio Moriconi
 
Backend as a Service: Parse - Moriconi
Backend as a Service: Parse - MoriconiBackend as a Service: Parse - Moriconi
Backend as a Service: Parse - Moriconi
Codemotion
 
muCon 2014 "Building Java Microservices for the Cloud"
muCon 2014 "Building Java Microservices for the Cloud"muCon 2014 "Building Java Microservices for the Cloud"
muCon 2014 "Building Java Microservices for the Cloud"
Daniel Bryant
 
Deploy via CircleCI
Deploy via CircleCIDeploy via CircleCI
Deploy via CircleCI
Yuki Matsukura
 
Ruxcon 2014 - Stefan Esser - iOS8 Containers, Sandboxes and Entitlements
Ruxcon 2014 - Stefan Esser - iOS8 Containers, Sandboxes and EntitlementsRuxcon 2014 - Stefan Esser - iOS8 Containers, Sandboxes and Entitlements
Ruxcon 2014 - Stefan Esser - iOS8 Containers, Sandboxes and Entitlements
Stefan Esser
 
Presentazione Codemotion
Presentazione Codemotion Presentazione Codemotion
Presentazione Codemotion
LinkMe Srl
 
ESP8266 and IOT
ESP8266 and IOTESP8266 and IOT
ESP8266 and IOT
dega1999
 
Create a-strong-two-factors-authentication-device-for-less-than-chf-100
Create a-strong-two-factors-authentication-device-for-less-than-chf-100Create a-strong-two-factors-authentication-device-for-less-than-chf-100
Create a-strong-two-factors-authentication-device-for-less-than-chf-100
Cyber Security Alliance
 
TYPO3 Neos - the compendium (version 1.0.2)
TYPO3 Neos - the compendium (version 1.0.2)TYPO3 Neos - the compendium (version 1.0.2)
TYPO3 Neos - the compendium (version 1.0.2)
die.agilen GmbH
 
Fred bovyresume@2
Fred bovyresume@2Fred bovyresume@2
Fred bovyresume@2
Fred Bovy
 
Andrea De Gaetano - An Adventure with ESP8266 firmwares and IOT
Andrea De Gaetano - An Adventure with ESP8266 firmwares and IOTAndrea De Gaetano - An Adventure with ESP8266 firmwares and IOT
Andrea De Gaetano - An Adventure with ESP8266 firmwares and IOT
Codemotion
 
Blockchain Software for Hardware: The Canaan AvalonMiner Open Source Embedded...
Blockchain Software for Hardware: The Canaan AvalonMiner Open Source Embedded...Blockchain Software for Hardware: The Canaan AvalonMiner Open Source Embedded...
Blockchain Software for Hardware: The Canaan AvalonMiner Open Source Embedded...
Mike Qin
 
Recipes to develop a reactive and cloud-ready application using Scala and Akka
Recipes to develop a reactive and cloud-ready application using Scala and AkkaRecipes to develop a reactive and cloud-ready application using Scala and Akka
Recipes to develop a reactive and cloud-ready application using Scala and Akka
Codemotion
 
Sviluppare in cloud con M.E.A.N.: il caso Crowdcore
Sviluppare in cloud con M.E.A.N.: il caso CrowdcoreSviluppare in cloud con M.E.A.N.: il caso Crowdcore
Sviluppare in cloud con M.E.A.N.: il caso Crowdcore
Codemotion
 
Janus Workshop @ ClueCon 2020
Janus Workshop @ ClueCon 2020Janus Workshop @ ClueCon 2020
Janus Workshop @ ClueCon 2020
Lorenzo Miniero
 

Similar to Bluetooth 4.0 and iBeacons in your iOS [Codemotion Milan 2014] (20)

Mettere l' IoT in Cloud con FIWARE - Massimo Vecchio, Attilio Broglio - Codem...
Mettere l' IoT in Cloud con FIWARE - Massimo Vecchio, Attilio Broglio - Codem...Mettere l' IoT in Cloud con FIWARE - Massimo Vecchio, Attilio Broglio - Codem...
Mettere l' IoT in Cloud con FIWARE - Massimo Vecchio, Attilio Broglio - Codem...
 
The Continuous Delivery Value - Codemotion Milano 2014
The Continuous Delivery Value - Codemotion Milano 2014The Continuous Delivery Value - Codemotion Milano 2014
The Continuous Delivery Value - Codemotion Milano 2014
 
Post password era - Bernard Toplak, OWASP Croatia Meetup 2016
Post password era - Bernard Toplak, OWASP Croatia Meetup 2016Post password era - Bernard Toplak, OWASP Croatia Meetup 2016
Post password era - Bernard Toplak, OWASP Croatia Meetup 2016
 
FIWARE Accelerator Programme: 80 Milion Euro for Start-Ups and SMEs
FIWARE Accelerator Programme: 80 Milion Euro for Start-Ups and SMEsFIWARE Accelerator Programme: 80 Milion Euro for Start-Ups and SMEs
FIWARE Accelerator Programme: 80 Milion Euro for Start-Ups and SMEs
 
Sviluppare in cloud con M.E.A.N.: il caso Crowdcore
Sviluppare in cloud con M.E.A.N.: il caso CrowdcoreSviluppare in cloud con M.E.A.N.: il caso Crowdcore
Sviluppare in cloud con M.E.A.N.: il caso Crowdcore
 
Backend as a Service: Parse
Backend as a Service: ParseBackend as a Service: Parse
Backend as a Service: Parse
 
Backend as a Service: Parse - Moriconi
Backend as a Service: Parse - MoriconiBackend as a Service: Parse - Moriconi
Backend as a Service: Parse - Moriconi
 
muCon 2014 "Building Java Microservices for the Cloud"
muCon 2014 "Building Java Microservices for the Cloud"muCon 2014 "Building Java Microservices for the Cloud"
muCon 2014 "Building Java Microservices for the Cloud"
 
Deploy via CircleCI
Deploy via CircleCIDeploy via CircleCI
Deploy via CircleCI
 
Ruxcon 2014 - Stefan Esser - iOS8 Containers, Sandboxes and Entitlements
Ruxcon 2014 - Stefan Esser - iOS8 Containers, Sandboxes and EntitlementsRuxcon 2014 - Stefan Esser - iOS8 Containers, Sandboxes and Entitlements
Ruxcon 2014 - Stefan Esser - iOS8 Containers, Sandboxes and Entitlements
 
Presentazione Codemotion
Presentazione Codemotion Presentazione Codemotion
Presentazione Codemotion
 
ESP8266 and IOT
ESP8266 and IOTESP8266 and IOT
ESP8266 and IOT
 
Create a-strong-two-factors-authentication-device-for-less-than-chf-100
Create a-strong-two-factors-authentication-device-for-less-than-chf-100Create a-strong-two-factors-authentication-device-for-less-than-chf-100
Create a-strong-two-factors-authentication-device-for-less-than-chf-100
 
TYPO3 Neos - the compendium (version 1.0.2)
TYPO3 Neos - the compendium (version 1.0.2)TYPO3 Neos - the compendium (version 1.0.2)
TYPO3 Neos - the compendium (version 1.0.2)
 
Fred bovyresume@2
Fred bovyresume@2Fred bovyresume@2
Fred bovyresume@2
 
Andrea De Gaetano - An Adventure with ESP8266 firmwares and IOT
Andrea De Gaetano - An Adventure with ESP8266 firmwares and IOTAndrea De Gaetano - An Adventure with ESP8266 firmwares and IOT
Andrea De Gaetano - An Adventure with ESP8266 firmwares and IOT
 
Blockchain Software for Hardware: The Canaan AvalonMiner Open Source Embedded...
Blockchain Software for Hardware: The Canaan AvalonMiner Open Source Embedded...Blockchain Software for Hardware: The Canaan AvalonMiner Open Source Embedded...
Blockchain Software for Hardware: The Canaan AvalonMiner Open Source Embedded...
 
Recipes to develop a reactive and cloud-ready application using Scala and Akka
Recipes to develop a reactive and cloud-ready application using Scala and AkkaRecipes to develop a reactive and cloud-ready application using Scala and Akka
Recipes to develop a reactive and cloud-ready application using Scala and Akka
 
Sviluppare in cloud con M.E.A.N.: il caso Crowdcore
Sviluppare in cloud con M.E.A.N.: il caso CrowdcoreSviluppare in cloud con M.E.A.N.: il caso Crowdcore
Sviluppare in cloud con M.E.A.N.: il caso Crowdcore
 
Janus Workshop @ ClueCon 2020
Janus Workshop @ ClueCon 2020Janus Workshop @ ClueCon 2020
Janus Workshop @ ClueCon 2020
 

Recently uploaded

GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
Alina Yurenko
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptxLORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
lorraineandreiamcidl
 
Launch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in MinutesLaunch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in Minutes
Roshan Dwivedi
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
Google
 
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
mz5nrf0n
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke
 
Mobile app Development Services | Drona Infotech
Mobile app Development Services  | Drona InfotechMobile app Development Services  | Drona Infotech
Mobile app Development Services | Drona Infotech
Drona Infotech
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
Aftab Hussain
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
Google
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
Boni García
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
mz5nrf0n
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
timtebeek1
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
Green Software Development
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
Deuglo Infosystem Pvt Ltd
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Neo4j
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
Shane Coughlan
 

Recently uploaded (20)

GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptxLORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
 
Launch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in MinutesLaunch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in Minutes
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
 
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
 
Mobile app Development Services | Drona Infotech
Mobile app Development Services  | Drona InfotechMobile app Development Services  | Drona Infotech
Mobile app Development Services | Drona Infotech
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
 

Bluetooth 4.0 and iBeacons in your iOS [Codemotion Milan 2014]

  • 1. MILAN november 28th/29th, 2014 Francesco Novelli Bluetooth 4.0 and iBeacons in your iOS app francesco.nove@gmail.com - RunCode @if9 runcode.it
  • 2. MILAN november 28th/29th, 2014 – Francesco Novelli Chi sono? 1. Appassionato di tecnologia! 2. Freelance! 3. iOS Developer 4. Blogger per devApp.it 5. Ex Scrittore di libri 6. Ex Web Developer
  • 3. MILAN november 28th/29th, 2014 – Francesco Novelli Thanks to: blinkar http://blinkar.it
  • 4. MILAN november 28th/29th, 2014 – Francesco Novelli Agenda: • Bluetooth 4.0 • iBeacons • Beacons alternatives • iOS 7…7.1….8!
  • 5. MILAN november 28th/29th, 2014 – Francesco Novelli Bluetooth 4.0: cos’è? • BLE: Bluetooth Low Energy • Standard, niente draft! (dal 2010) • Chip diverso da 3.0 e non retro compatibile • Dual Chip Device
  • 6. MILAN november 28th/29th, 2014 – Francesco Novelli LOW ENERGY!!!!
  • 7. MILAN november 28th/29th, 2014 – Francesco Novelli Bluetooth 4.0: Le novità “minori” • Niente abbinamenti, accoppiamenti, PIN, attese • Advertising continuo (se acceso…) • Low energy MIN 0.01 - MAX 0.5 Old Bluetooth 1 • Meno Range (50m vs 100m) • Meno Throughput (0.27Mbit/s vs 2.1 Mbit/s) • Meno Latency (6ms vs 100ms)
  • 8. MILAN november 28th/29th, 2014 – Francesco Novelli Bluetooth 4.0: A cosa non serve • Auricolari • Scambio dati • Cuffie • … • e quindi??
  • 9. MILAN november 28th/29th, 2014 – Francesco Novelli Bluetooth 4.0: A cosa serve • IoT Internet of Things • Orologi (Apple Watch, Android Wear, Pebble) • Sport e device fitness • Healtcare • Security • Proxymity • Automation • Everything!
  • 10. MILAN november 28th/29th, 2014 – Francesco Novelli Bluetooth 4.0: Profili di utilizzo • GATT: is.gd/blegatt • Da leggere per developer • Da leggere per ogni hardware makers • Adattare il device BLE con i profili
  • 11. MILAN november 28th/29th, 2014 – Francesco Novelli Bluetooth 4.0 e iOS • CoreBluetooth • iOS e Mac OS X • Bluetooth ad alto livello
  • 12. MILAN november 28th/29th, 2014 – Francesco Novelli Bluetooth 4.0 e iOS • CBCentralManager: • CBPeripheral: device bluetooth • CBService: servizi del device • CBCharacteristic: informazioni del servizio
  • 13. MILAN november 28th/29th, 2014 – Francesco Novelli Bluetooth 4.0 e iOS CBCentralManager: CBPeripheral CBService CBCharacteristic X 123
  • 14. MILAN november 28th/29th, 2014 – Francesco Novelli DEMO
  • 15. MILAN november 28th/29th, 2014 – Francesco Novelli Bluetooth 4.0 e iOS • iPhone 4s + • Mac Thanks to theapplelounge.com
  • 16. MILAN november 28th/29th, 2014 – Francesco Novelli iBeacon • Cos’è? • Come funziona? • Dove si trova? • Quanto costa? • Come lo uso?
  • 17. MILAN november 28th/29th, 2014 – Francesco Novelli iBeacon iBeacon, a new class of low-powered, low-cost transmitters that can notify nearby iOS 7 devices of their presence, provides apps a whole new level of location awareness, such as trail markers in a park, exhibits in a museum, or product displays in stores.
  • 18. MILAN november 28th/29th, 2014 – Francesco Novelli iBeacon: notify…what? • UDID (Hex ID) • Major (Int) • Minor (Int) • … • Sempre! • A chiunque, in broadcasting
  • 19. MILAN november 28th/29th, 2014 – Francesco Novelli iBeacon: Sample • UUDID: E2C56DB5-DFFB-48D2-B060-D0F5A71096E0 Museo Uffizi • Major: int 2 Piano 2 • Minor: int 13 Quadro 13 • quindi… • sei nel Museo al secondo piano davanti al quadro 13. propongo audio guida per quel quadro.
  • 20. MILAN november 28th/29th, 2014 – Francesco Novelli iBeacon: cos’è fisicamente?
  • 21. MILAN november 28th/29th, 2014 – Francesco Novelli iBeacon da iDevice • CoreBluetooth.framework (AirLocate sample code) _peripheralManager = ! [[CBPeripheralManager alloc] initWithDelegate:self queue:dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0)]; NSDictionary *peripheralData = nil;! if(_uuid && _major && _minor)! {! CLBeaconRegion *region = ! [[CLBeaconRegion alloc] initWithProximityUUID:_uuid ! major:[_major shortValue] ! minor:[_minor shortValue] ! identifier:@"com.apple.AirLocate"];! peripheralData = [region peripheralDataWithMeasuredPower:_power];! } [_peripheralManager startAdvertising:peripheralData];
  • 22. MILAN november 28th/29th, 2014 – Francesco Novelli iBeacon: Gli altri
  • 23. MILAN november 28th/29th, 2014 – Francesco Novelli iBeacon: Estimote • Largamente apprezzati • Versione stickers (accelerometro e temperatura) • Custom SDK • Android SDK • Costo elevato
  • 24. MILAN november 28th/29th, 2014 – Francesco Novelli iBeacon: Gimbal • Qualcomm! • Prezzo basso • Programmabili via iPhone • SDK potenziato (non obbligatorio) • Controllo via web (con SDK proprietario) • Android SDK • Consumo batteria da rivedere • Versione Tag o Device
  • 25. MILAN november 28th/29th, 2014 – Francesco Novelli iBeacon: Consumi http://is.gd/ibeaconcomp
  • 26. MILAN november 28th/29th, 2014 – Francesco Novelli iBeacon: Come lo uso? NOTIFY MONITORING
  • 27. MILAN november 28th/29th, 2014 – Francesco Novelli
  • 28. MILAN november 28th/29th, 2014 – Francesco Novelli iBeacon: Notify • CLLocationManager e delegate • Metodo delegate chiamato ad ogni entrata o uscita da una CLBeaconRegion (campo iBeacon) • Disponibile anche ad app in background • Si può osservare un UUID o una iBeacon (UUID + Major + Minor)
  • 29. MILAN november 28th/29th, 2014 – Francesco Novelli iBeacon: Notify _locationManager = [[CLLocationManager alloc] init];! _locationManager.delegate = self;! ! CLBeaconRegion *region = nil;! _uuid = [[NSUUID alloc] initWithUUIDString:@“E2C56DB5- DFFB-48D2-B060-D0F5A71096E0"];! region = ! [[CLBeaconRegion alloc] initWithProximityUUID:_uuid! identifier:@"com.apple.AirLocate"];! region.notifyOnEntry = YES;! region.notifyOnExit = YES;! region.notifyEntryStateOnDisplay = YES;! ! [_locationManager startMonitoringForRegion:region];
  • 30. MILAN november 28th/29th, 2014 – Francesco Novelli iBeacon: Notify delegate - (void)locationManager:(CLLocationManager *)manager ! didEnterRegion:(CLRegion *)region; - (void)locationManager:(CLLocationManager *)manager! didExitRegion:(CLRegion *)region; - (void)locationManager:(CLLocationManager *)manager! didDetermineState:(CLRegionState)state! forRegion:(CLRegion *)region;!
  • 31. MILAN november 28th/29th, 2014 – Francesco Novelli iBeacon: Notify, quando? • Location awareness push notification • Interattività dell’app • Pagamenti
  • 32. MILAN november 28th/29th, 2014 – Francesco Novelli iBeacon: Monitoring • CLLocationManager e delegate • Metodo del delegate invocato ogni secondo (se ci sono 1 o più beacon) • Array di beacons
  • 33. MILAN november 28th/29th, 2014 – Francesco Novelli iBeacon: Monitoring _locationManager = [[CLLocationManager alloc] init];! _locationManager.delegate = self;! ! CLBeaconRegion *region = nil;! _uuid = ! [[NSUUID alloc] initWithUUIDString:@“E2C56DB5-DFFB-48D2-B060- D0F5A71096E0"];! region = [[CLBeaconRegion alloc] initWithProximityUUID:_uuid identifier:@"com.apple.AirLocate"];! [_locationManager startRangingBeaconsInRegion:region];! !! - (void)locationManager:(CLLocationManager *)manager! didRangeBeacons:(NSArray *)beacons! inRegion:(CLBeaconRegion *)region {! !! NSLog(@"Major: %@, Minor: %@, Acc: %.2fm %li", beacon.major, beacon.minor, beacon.accuracy, beacon.proximity);! ! }
  • 34. MILAN november 28th/29th, 2014 – Francesco Novelli iBeacon: Monitoring, quando? • Geofencing al chiuso • Elencare beacons vicini • Ottenere le distanza da un beacon • Visualizzare informazioni con app aperta
  • 35. MILAN november 28th/29th, 2014 – Francesco Novelli iBeacon: iOS Roadmap • 7.0 Introduzione • 7.1 Notify con app killate Velocità maggiore per le notifiche • 8.0 Continuity Icon
  • 36. MILAN november 28th/29th, 2014 – Francesco Novelli iBeacon: Case history • MLB • Virgin • Apple Store • Musei Palazzo Farnese • Nazioni unite • Parchi floreali • Caccia al tesoro • …
  • 37. MILAN november 28th/29th, 2014 – Francesco Novelli iBeacon: Android • Android 4.3+ (e.g. Samsung Galaxy S3/S4/S4 Mini, Samsung Galaxy Note 2/3, HTC One, Google/LG Nexus 7 2013 version/Nexus 4/ Nexus 5, HTC Butterfly, OnePlus One) • SDK produttori (Gimbal, Estimote, etc) • AltBeacon Project
  • 38. MILAN november 28th/29th, 2014 – Francesco Novelli iBeacon: Resources • iBeacon Bible • developer.apple.com/ibeacon • WWDC 2014 Session 307 – What’s New In Core Location • AirLocate Sample Code
  • 39. MILAN november 28th/29th, 2014 Thanks Francesco Novelli Bluetooth 4.0 and iBeacons in your iOS app francesco.nove@gmail.com - RunCode @if9 runcode.it