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
Amazon RDS 向けに提供されている MCP Server と仕組みを調べてみた/jawsug-okayama-2025-aurora-mcp
takahashiikki
1
120
アプリの "かわいい" を支えるアニメーションツールRiveについて
uetyo
0
280
MCPとデザインシステムに立脚したデザインと実装の融合
yukukotani
4
1.5k
rage against annotate_predecessor
junk0612
0
170
🔨 小さなビルドシステムを作る
momeemt
4
690
1から理解するWeb Push
dora1998
7
1.9k
AI Coding Agentのセキュリティリスク:PRの自己承認とメルカリの対策
s3h
0
240
Platformに“ちょうどいい”責務ってどこ? 関心の熱さにあわせて考える、責務分担のプラクティス
estie
1
140
Navigating Dependency Injection with Metro
zacsweers
3
3.5k
go test -json そして testing.T.Attr / Kyoto.go #63
utgwkk
3
310
ぬるぬる動かせ! Riveでアニメーション実装🐾
kno3a87
1
230
スケールする組織の実現に向けた インナーソース育成術 - ISGT2025
teamlab
PRO
2
170
Featured
See All Featured
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3k
Balancing Empowerment & Direction
lara
3
630
Site-Speed That Sticks
csswizardry
10
820
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
36
2.5k
Building Adaptive Systems
keathley
43
2.7k
Git: the NoSQL Database
bkeepers
PRO
431
66k
The Cost Of JavaScript in 2023
addyosmani
53
8.9k
Side Projects
sachag
455
43k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Rebuilding a faster, lazier Slack
samanthasiow
83
9.2k
Facilitating Awesome Meetings
lara
55
6.5k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.1k
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?