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
92
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
Domain-centric? Why Hexagonal, Onion, and Clean Architecture Are Answers to the Wrong Question
olivergierke
2
780
私はどうやって技術力を上げたのか
yusukebe
43
18k
バッチ処理を「状態の記録」から「事実の記録」へ
panda728
PRO
0
140
オープンソースソフトウェアへの解像度🔬
utam0k
11
2.3k
overlayPreferenceValue で実現する ピュア SwiftUI な AdMob ネイティブ広告
uhucream
0
170
CSC305 Lecture 05
javiergs
PRO
0
210
アメ車でサンノゼを走ってきたよ!
s_shimotori
0
210
Signals & Resource API in Angular: 3 Effective Rules for Your Architecture @BASTA 2025 in Mainz
manfredsteyer
PRO
0
110
Cloudflare AgentsとAI SDKでAIエージェントを作ってみた
briete
0
130
理論と実務のギャップを超える
eycjur
0
120
AI Coding Meetup #3 - 導入セッション / ai-coding-meetup-3
izumin5210
0
650
登壇は dynamic! な営みである / speech is dynamic
da1chi
0
230
Featured
See All Featured
How to train your dragon (web standard)
notwaldorf
96
6.3k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.2k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Reflections from 52 weeks, 52 projects
jeffersonlam
352
21k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
45
2.5k
A Tale of Four Properties
chriscoyier
160
23k
Designing for humans not robots
tammielis
254
26k
Designing Experiences People Love
moore
142
24k
A better future with KSS
kneath
239
18k
The Art of Programming - Codeland 2020
erikaheidi
56
14k
Done Done
chrislema
185
16k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.2k
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?