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
Juan Ignacio Laube
January 28, 2014
Programming
0
90
Introducción a iBeacons
Presentación de la charla para el segundo meetup de MobileUY.
Juan Ignacio Laube
January 28, 2014
Tweet
Share
Other Decks in Programming
See All in Programming
Folding Cheat Sheet #3
philipschwarz
PRO
0
120
Site Reliability Engineering for GMO
pyama86
7
1k
0→1と1→10の狭間で Javaという技術選定を振り返る/Reflecting on the Decision to Choose Java Between Scaling from 0 to 1 and 1 to 10
jaguar_imo
2
380
Code Reviews
bkuhlmann
4
890
FigmaとPHPで作る1ミリたりとも表示崩れしない最強の帳票印刷ソリューション
ttskch
43
18k
#phpcon_odawara オープン・クローズドなテストフィクスチャを求めて / open closed test fixtures
77web
3
220
Front-end application development, Symfony-style(s)
dunglas
2
2k
MicrosoftのPlatform Engineeringガイドを読んで実際になにかやってみた
ymd65536
1
250
ADRを一年運用してみた/adr_after_a_year
hanhan1978
7
2.3k
SwiftUI Performance 不要なViewの再描画と更新を抑える
bigamitiongit
1
160
Ruby GitHub Packages
bkuhlmann
0
630
HUIT新歓2024「競技プログラミング、やってみませんか?」
slephy2784
1
260
Featured
See All Featured
Put a Button on it: Removing Barriers to Going Fast.
kastner
58
3k
Designing Experiences People Love
moore
136
23k
The Straight Up "How To Draw Better" Workshop
denniskardys
227
130k
Optimizing for Happiness
mojombo
370
69k
Infographics Made Easy
chrislema
238
18k
The Illustrated Children's Guide to Kubernetes
chrisshort
30
46k
Building Your Own Lightsaber
phodgson
98
5.7k
Designing the Hi-DPI Web
ddemaree
276
33k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
1
1.3k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
19
1.9k
Writing Fast Ruby
sferik
620
60k
The Power of CSS Pseudo Elements
geoffreycrofte
59
5k
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?