Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Introducción a iBeacons
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Juan Ignacio Laube
January 28, 2014
Programming
99
0
Share
Introducción a iBeacons
Presentación de la charla para el segundo meetup de MobileUY.
Juan Ignacio Laube
January 28, 2014
Other Decks in Programming
See All in Programming
oxlintはeslint/typescript-eslintを置き換えられるのか
shomafujita
2
290
New "Type" system on PicoRuby
pocke
1
380
iOS26時代の新規アプリ開発
yuukiw00w
0
220
RTSPクライアントを自作してみた話
simotin13
0
370
自動レビューエンジンの実装と運用 ~レビューのない世界へ~
kurukuru1999
2
300
TypeScriptだけでAIエージェントを作る フロント・エージェント・インフラのフルスタック実践
har1101
6
1.2k
AI 時代のソフトウェア設計の学び方
masuda220
PRO
29
11k
tsserverとは何だったのか、これからどうなるのか
nowaki28
1
420
初めてのRubyKaigiはこう見えた
jellyfish700
0
350
TypeSpec で繋ぐ複数プロダクトの型安全
maroon8021
1
270
CLIであることを活かしたGitHub Copilot CLI活用術 / GitHub Copilot CLI Pro Tips & Tricks
nao_mk2
1
1.1k
Moments When Things Go Wrong
aurimas
3
130
Featured
See All Featured
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
300
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.6k
Designing for Timeless Needs
cassininazir
1
240
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
340
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.2k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
150
Joys of Absence: A Defence of Solitary Play
codingconduct
1
380
Speed Design
sergeychernyshev
33
1.8k
4 Signs Your Business is Dying
shpigford
187
22k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
1.1k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
230
Crafting Experiences
bethany
1
160
Transcript
MobileUY - 2do meetup Introducción a iBeacons Juan Ignacio Laube!
@jlaube77
¿Que es iBeacon?
Es una tecnología de posicionamiento.! Permite recibir notificaciones al entrar
o salir de cierta ubicación que estamos monitoreando.! Basado en Bluetooth 4.0 (a.k.a. BLE).
La tecnología por si sola no es lo importante…! Lo
interesante está en todas sus posibles aplicaciones.
¿Que NO es?
! Una alternativa al GPS.! Un protocolo nuevo.! El “NFC
killer” de Apple.
¿Como funciona?
Dos tipos de dispositivos.! Anunciante y receptor.
Un beacon es un mensaje enviado “en broadcast”.! Compuesto por
un UUID, Identifier, Major y Minor.
UUID e Identifier identifican una región.! Major y Minor son
dos valores numéricos que pueden ser usados por el desarrollador.
Immediate < 1 m Near 1 a 2 m Far
< 70 m Outside (unknown)
Beacon advertisers
http://estimote.com/ Estimote Pack de 3 x U$S 99.! Features extras
como acelerometro y termometro.! Pila de litio, dura ~2 años.! UUID programable.! API extra para iOS y Android.
http://www.radiusnetworks.com/ Radius Network RadBeacon default UUID - U$S 29.! RadBeacon
custom UUID - U$S 39.! ! Hay packs x100 y x1000.! ! Proveen software adicional de analytics y herramientas para desarrolladores.
http://www.thetileapp.com/ Tile U$S 20 cada uno.! Pila interna, no se
puede cambiar.! Vida util de un año.! Facil de ubicar.!
Raspberry Pi Necesita un modulo Bluetooth 4.0 USB.! Existen implementaciones
de beacon advisers open source.! Costo aproximado del kit U$S 50.
iOS device Los dispositivos iOS pueden ser emitters.! Disponible para
iPhone 4S, iPad mini y iPad 3 en adelante.
Mac / PC Similar a los dispositivos iOS.! Requiere Bluetooth
4.0.
¿Que usos tiene?
Publicidad.! Mejor comunicación con el usuario.! Localización en espacios reducidos.!
Identificación de objetos personales.! Recorridos por museos.! Juegos.
Casos de éxito Apple Store.! Macy’s.! Estadios de baseball.! Tile
app.
¿Como lo uso en mi app?
Configurar Background modes (Location)! Importar CoreLocation.framework
#import <CoreLocation/CoreLocation.h> #import "MyViewController.h" ! @interface MyViewController () <CLLocationManagerDelegate> !
@property(nonatomic, strong) CLLocationManager *locationManager; ! @end ! ! @implementation MyViewController ! static NSString *_beaconUUIDStr = @“Beacon UUID"; static NSString *_beaconIdentifierStr = @“Beacon Identifier"; ! . . .
- (void)viewDidLoad { [super viewDidLoad]; self.locationManager = [[CLLocationManager alloc] init];
self.locationManager.delegate = self; NSUUID *uuid = [[NSUUID alloc] initWithUUIDString:_beaconUUIDStr]; CLBeaconRegion *region = [[CLBeaconRegion alloc] initWithProximityUUID:uuid identifier:_beaconIdentifierStr]; ! region.notifyOnEntry = YES; region.notifyOnExit = YES; [self.locationManager startMonitoringForRegion:region]; [self.locationManager requestStateForRegion:region]; }
- (void)locationManager:(CLLocationManager *)manager didEnterRegion:(CLRegion *)region ! - (void)locationManager:(CLLocationManager *)manager didExitRegion:(CLRegion
*)region ! - (void)locationManager:(CLLocationManager *)manager didDetermineState:(CLRegionState)state forRegion:(CLRegion *)region ! - (void)locationManager:(CLLocationManager *)manager didRangeBeacons:(NSArray *)beacons inRegion:(CLBeaconRegion *)region
Configurando un advertiser
Configurar Background modes (Act as BLE accessory)! Importar CoreBluetooth.framework! Importar
CoreLocation.framework
#import <CoreBluetooth/CoreBluetooth.h> #import <CoreLocation/CoreLocation.h> #import "MyViewController.h" ! @interface MyViewController ()
<UITextFieldDelegate> ! @property (strong, nonatomic) CBPeripheralManager *peripheralManager; ! @end
- (void)startAdvertising { CLBeaconRegion *region = [[CLBeaconRegion alloc] initWithProximityUUID:_beaconUUID major:_major
minor:_minor identifier:_identifier]; NSDictionary *beaconData = [region peripheralDataWithMeasuredPower:nil]; NSLog(@"Start advertising with data: %@", beaconData); [self.peripheralManager startAdvertising:beaconData]; self.isAdvertising = YES; }
- (void)viewDidLoad { [super viewDidLoad]; self.peripheralManager = [[CBPeripheralManager alloc] initWithDelegate:self
queue:dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0)]; }
Demo
¿Preguntas?