intro to ibeacon and bluetooth low energy

62
Introduction to iBeacon and BLE @KurtMcIntire

Upload: kurt-mcintire

Post on 08-Sep-2014

5.245 views

Category:

Technology


1 download

DESCRIPTION

FULL VIDEO ON YOUTUBE - https://www.youtube.com/watch?v=wpl1f8f4Vis Speaker: Kurt McIntire, Co-Founder, Vektor Digital @kurtmcintire, @vektordigital iBeacons are small devices that transmit data via Bluetooth Low Energy. iOS devices can detect these signals as well as transmit data as iBeacons. When within range of an iBeacon, events like push notifications and server calls can be triggered inside apps. As mobile marketers and developers, iBeacon technology presents us an incredible opportunity to build sophisticated, proximity based apps for clients and for distribution on the App Store. In this talk, we’ll explore: 1. What are iBeacons and BLE? 2. How to detect iBeacons inside your apps 3. How to make your iOS device act as an iBeacon 4. Potential applications / Apps using iBeacon

TRANSCRIPT

Page 1: Intro to iBeacon and Bluetooth Low Energy

Introduction to iBeacon and BLE @KurtMcIntire

Page 2: Intro to iBeacon and Bluetooth Low Energy

#iBeacon @VektorDigital @KurtMcIntire

Page 3: Intro to iBeacon and Bluetooth Low Energy

Source: aim.org

Page 4: Intro to iBeacon and Bluetooth Low Energy

Source: aim.org

Page 5: Intro to iBeacon and Bluetooth Low Energy

Source: starhooks.blogspot.com

Page 6: Intro to iBeacon and Bluetooth Low Energy

Source: starhooks.blogspot.com

Page 7: Intro to iBeacon and Bluetooth Low Energy

Source: starhooks.blogspot.com

three minutes elapse

Page 8: Intro to iBeacon and Bluetooth Low Energy

Source: starhooks.blogspot.com

Page 9: Intro to iBeacon and Bluetooth Low Energy

Overview 1.  What is BLE? 2.  What is iBeacon? 3.  How to detect iBeacons 4.  How make your iOS device an iBeacon 5.  Demos & Real-world Applications

Page 10: Intro to iBeacon and Bluetooth Low Energy

Bluetooth Low Energy Optimized for small bursts of data Impressive battery life  Ideal for sensors

Page 11: Intro to iBeacon and Bluetooth Low Energy

Sensors & Wearables

Photo Sources: ewf.sm, macrumors.com,

cdn.macrumors.com

Page 12: Intro to iBeacon and Bluetooth Low Energy

Joke and Photo Source: Punch Through Design

#iBacon  

Page 13: Intro to iBeacon and Bluetooth Low Energy

Photo Source: Beekn.net

#iBeacon  

Page 14: Intro to iBeacon and Bluetooth Low Energy

UUID B9407F30-

F5F8- 466E- AFF9-

25556B57FE6D

34956

58549 Major

Minor

Page 15: Intro to iBeacon and Bluetooth Low Energy

Photo Sources: QualCom, Estimote, PunchThrough, Roximity

manufacturers  

Page 16: Intro to iBeacon and Bluetooth Low Energy

manufacturers  

Battery Life 2 mo - 2 yr  

Cost ~0 - $99  

Dashboards and Beacon Management Tools  

Page 17: Intro to iBeacon and Bluetooth Low Energy

iBeacon

BLUETOOTH LE SIGNAL

Page 18: Intro to iBeacon and Bluetooth Low Energy

Phones and tablets As iBeacons

Page 19: Intro to iBeacon and Bluetooth Low Energy

250,000,000 Bluetooth low energy

Phones and tablets

Page 20: Intro to iBeacon and Bluetooth Low Energy

1.  User needs your app 2.  User must have app-on (does not need to

be “open”) 3.  User needs Bluetooth BLE compatible

device 4.  User needs Bluetooth on 5.  User must allow you to push messages

Requirements  

Page 21: Intro to iBeacon and Bluetooth Low Energy

You’re not wrong You’re just an asshole

Photo Source: blog.estately.com

Page 22: Intro to iBeacon and Bluetooth Low Energy

The dude says,

Photo Source: blog.estately.com

Page 23: Intro to iBeacon and Bluetooth Low Energy

1.  Don’t spam the s**t out of people 2.  Don’t send repeat messages 3.  Provide value

Photo Source: blog.estately.com

Page 24: Intro to iBeacon and Bluetooth Low Energy

Detect Beacons

Page 25: Intro to iBeacon and Bluetooth Low Energy

Framework #import <CoreLocation/CoreLocation.h>!

Delegate <CLLocationManagerDelegate>!

Page 26: Intro to iBeacon and Bluetooth Low Energy

Set up a

Region

Page 27: Intro to iBeacon and Bluetooth Low Energy

Set up a Region

- (id)initWithProximityUUID:(NSUUID *)proximityUUID major:(CLBeaconMajorValue)major minor:(CLBeaconMinorValue)minor identifier:(NSString *)identifier;!

- (id)initWithProximityUUID:(NSUUID *)proximityUUID identifier:(NSString *)identifier;!

OR

!CLBeaconRegion *beaconRegion!

Page 28: Intro to iBeacon and Bluetooth Low Energy

Set up a Region

static NSString *const kUUID = @"B9407F30-F5F8-466E-AFF9-25556B57FE6D";!!static NSString *const kIdentifier = @"EstimoteBeacon”;!

Page 29: Intro to iBeacon and Bluetooth Low Energy

Location manager CLLocationManager *locationManager!

1. Monitoring 2. Ranging

Page 30: Intro to iBeacon and Bluetooth Low Energy

Monitoring

Inside or Outside Works when phone asleep

Page 31: Intro to iBeacon and Bluetooth Low Energy

Monitoring - (void)locationManager:(CLLocationManager *)manager!

!didDetermineState:(CLRegionState)state forRegion:(CLRegion *)region!

if (state == CLRegionStateInside) {!! !// do something !!}!

else if (state == CLRegionStateOutside) {!! !// do something!!}!

Page 32: Intro to iBeacon and Bluetooth Low Energy

Monitoring

- (void)locationManager:(CLLocationManager *)manager didExitRegion:(CLRegion *)region!

- (void)locationManager:(CLLocationManager *)manager didEnterRegion:(CLRegion *)region!!

Page 33: Intro to iBeacon and Bluetooth Low Energy

Monitoring

App State Distance (ft) Active 50 Asleep 18

Page 34: Intro to iBeacon and Bluetooth Low Energy

Ranging 1 / second Proximity Works when app active

Page 35: Intro to iBeacon and Bluetooth Low Energy

Ranging - (void)locationManager:(CLLocationManager *)manager!!didRangeBeacons:(NSArray *)beacons

inRegion:(CLBeaconRegion *)region!

Page 36: Intro to iBeacon and Bluetooth Low Energy

Ranging

NSArray *detectedBeacons!CLBeacon *closestBeacon!

Page 37: Intro to iBeacon and Bluetooth Low Energy

Closest Beacon _closestBeacon = [_detectedBeacons firstObject];!

Page 38: Intro to iBeacon and Bluetooth Low Energy

Ranging typedef {! CLProximityUnknown,! CLProximityImmediate,! CLProximityNear,! CLProximityFar!} CLProximity;!

Page 39: Intro to iBeacon and Bluetooth Low Energy

Ranging

2014-01-16 14:51:33.611 BeaconDemo[591:60b] (! "CLBeacon (uuid:<__NSConcreteUUID 0x17003c800> B9407F30-F5F8-466E-AFF9-25556B57FE6D, major:34956, minor:46961, proximity:2 +/- 1.20m, rssi:-73)",! "CLBeacon (uuid:<__NSConcreteUUID 0x17003c340> B9407F30-F5F8-466E-AFF9-25556B57FE6D, major:43680, minor:8490, proximity:3 +/- 6.49m, rssi:-86)",! "CLBeacon (uuid:<__NSConcreteUUID 0x17003d360> B9407F30-F5F8-466E-AFF9-25556B57FE6D, major:22222, minor:58549, proximity:3 +/- 8.61m, rssi:-85)"!)!

Page 40: Intro to iBeacon and Bluetooth Low Energy

Ranging

Beacon Proximity RSSI Beacon 1 2 +/- 1.20m -73 Beacon 2 3 +/- 6.49m -86 Beacon 3 3 +/- 8.61m -85

Page 41: Intro to iBeacon and Bluetooth Low Energy

Do Something! - (void)checkProximity {! switch (_closestBeacon.proximity) {!

! ! case CLProximityImmediate:! self.view.backgroundColor = [UIColor redColor];! [self beaconIsImmediate];! break;! case CLProximityNear:! self.view.backgroundColor = [UIColor yellowColor];! break;! case CLProximityFar:! self.view.backgroundColor = [UIColor blueColor];! break;! default:! break;! }!}!

Page 42: Intro to iBeacon and Bluetooth Low Energy

Make your device an iBeacon

Page 43: Intro to iBeacon and Bluetooth Low Energy

Frameworks #import <CoreBluetooth/CoreBluetooth.h>!

Delegate <CBPeripheralManagerDelegate>!

Page 44: Intro to iBeacon and Bluetooth Low Energy

The PlayerS CBPeripheralManager *peripheralManager!

NSDictionary *beaconPeripheralData!

Page 45: Intro to iBeacon and Bluetooth Low Energy

Set up a Region

- (id)initWithProximityUUID:(NSUUID *)proximityUUID major:(CLBeaconMajorValue)major minor:(CLBeaconMinorValue)minor identifier:(NSString *)identifier;!

- (id)initWithProximityUUID:(NSUUID *)proximityUUID identifier:(NSString *)identifier;!

OR

Page 46: Intro to iBeacon and Bluetooth Low Energy

Set up a Region

static NSString *const kUUID = @"DE8F8D67-4914-4B25-A9F2-EE0C624117CE";!!static NSString *const kIdentifier = @”MyiPhone”;!

Page 47: Intro to iBeacon and Bluetooth Low Energy

Advertising

[self.peripheralManager stopAdvertising];!

[self.peripheralManager startAdvertising:beaconPeripheralData];!

Page 48: Intro to iBeacon and Bluetooth Low Energy

Advertising

- (void)peripheralManagerDidUpdateState:(CBPeripheralManager *)peripheralManager!

Page 49: Intro to iBeacon and Bluetooth Low Energy

BEEKN.net Raywenderlich.com HiBeacons App – Github Radius Networks – iBeacon Monitoring in the Background and Foreground

resources

Page 50: Intro to iBeacon and Bluetooth Low Energy

Beer demo

Page 51: Intro to iBeacon and Bluetooth Low Energy

Coupon Redeem with Parse demo

Page 52: Intro to iBeacon and Bluetooth Low Energy

PKPKT

Page 53: Intro to iBeacon and Bluetooth Low Energy

PKPKT

h#p://pkpkt.com/  

Photo Source: insidemobileapps.com

Page 54: Intro to iBeacon and Bluetooth Low Energy

Apple Store ALL 254 Retail Locations

Page 55: Intro to iBeacon and Bluetooth Low Energy

Photo Source: insidemobileapps.com

Page 56: Intro to iBeacon and Bluetooth Low Energy

MLB At the Ballpark

Page 57: Intro to iBeacon and Bluetooth Low Energy

Photo Source: CNET News : MLB tests Apple's iBeacon at Citi Field

Page 58: Intro to iBeacon and Bluetooth Low Energy

NFL Mobile app

Page 59: Intro to iBeacon and Bluetooth Low Energy

Photo Source: nytimes.com

Page 60: Intro to iBeacon and Bluetooth Low Energy

Safeway Stores

Page 61: Intro to iBeacon and Bluetooth Low Energy

Photo Source: idownloadblog.com

Page 62: Intro to iBeacon and Bluetooth Low Energy

What will you make? iBeacon  

@VektorDigital @KurtMcIntire