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
#QiitaBash MCPのセキュリティ
ryosukedtomita
1
990
Code as Context 〜 1にコードで 2にリンタ 34がなくて 5にルール? 〜
yodakeisuke
0
120
5つのアンチパターンから学ぶLT設計
narihara
1
160
明示と暗黙 ー PHPとGoの インターフェイスの違いを知る
shimabox
2
480
ニーリーにおけるプロダクトエンジニア
nealle
0
800
LINEヤフー データグループ紹介
lycorp_recruit_jp
1
2.4k
今ならAmazon ECSのサービス間通信をどう選ぶか / Selection of ECS Interservice Communication 2025
tkikuc
21
3.9k
すべてのコンテキストを、 ユーザー価値に変える
applism118
3
1.2k
ruby.wasmで多人数リアルタイム通信ゲームを作ろう
lnit
3
450
AIと”コードの評価関数”を共有する / Share the "code evaluation function" with AI
euglena1215
1
150
Rubyでやりたい駆動開発 / Ruby driven development
chobishiba
1
660
Blazing Fast UI Development with Compose Hot Reload (droidcon New York 2025)
zsmb
1
290
Featured
See All Featured
What’s in a name? Adding method to the madness
productmarketing
PRO
23
3.5k
Reflections from 52 weeks, 52 projects
jeffersonlam
351
20k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
8
810
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
Rebuilding a faster, lazier Slack
samanthasiow
82
9.1k
Testing 201, or: Great Expectations
jmmastey
42
7.6k
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.8k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
2.9k
It's Worth the Effort
3n
185
28k
Producing Creativity
orderedlist
PRO
346
40k
Stop Working from a Prison Cell
hatefulcrawdad
270
21k
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?