ibeacon ios dev scout october 2013 talk

42
iBeacon What’s new in iOS 7 Friday, 25 October, 13

Upload: gabriel-lim

Post on 28-Jan-2015

107 views

Category:

Technology


0 download

DESCRIPTION

Gabriel sharing about iOS7 iBeacon technology and how it has the potential to shape local commerce landscape and overtake NFC.

TRANSCRIPT

Page 1: iBeacon iOS Dev Scout October 2013 Talk

iBeaconWhat’s new in iOS 7

Friday, 25 October, 13

Page 2: iBeacon iOS Dev Scout October 2013 Talk

About Me

• Co-Founder of Getting Real Software

• Specializes in mobile solutions for SMEs and businesses

• iOS and Ruby on Rails Developer

Friday, 25 October, 13

Page 3: iBeacon iOS Dev Scout October 2013 Talk

What is iBeacon?

• An extremely accurate locating system

Friday, 25 October, 13

Page 4: iBeacon iOS Dev Scout October 2013 Talk

What is iBeacon?

• An extremely accurate locating system

• Runs on Bluetooth Low Energy (BLE)

Friday, 25 October, 13

Page 5: iBeacon iOS Dev Scout October 2013 Talk

What is iBeacon?

• An extremely accurate locating system

• Runs on Bluetooth Low Energy (BLE)

• Possibly the death of NFC

Friday, 25 October, 13

Page 6: iBeacon iOS Dev Scout October 2013 Talk

What Can It Do?

• Allow for extremely accurate ranging, even indoors

Friday, 25 October, 13

Page 7: iBeacon iOS Dev Scout October 2013 Talk

What Can It Do?

• Allow for extremely accurate ranging, even indoors

• Broadcast on a near-permanent basis - very power efficient

Friday, 25 October, 13

Page 8: iBeacon iOS Dev Scout October 2013 Talk

What Can It Do?

• Allow for extremely accurate ranging, even indoors

• Broadcast on a near-permanent basis - very power efficient

• Supports most BLE iOS and Android devices - no need for NFC chip

Friday, 25 October, 13

Page 9: iBeacon iOS Dev Scout October 2013 Talk

Why Does It Matter?

• iBeacon will transform local commerce

Friday, 25 October, 13

Page 10: iBeacon iOS Dev Scout October 2013 Talk

Why Does It Matter?

• iBeacon will transform local commerce

• Indoor navigation

Friday, 25 October, 13

Page 11: iBeacon iOS Dev Scout October 2013 Talk

Why Does It Matter?

• iBeacon will transform local commerce

• Indoor navigation

• Open standard - Bluetooth 4.0

Friday, 25 October, 13

Page 12: iBeacon iOS Dev Scout October 2013 Talk

Demo

• Use case - Getting Real Store

Friday, 25 October, 13

Page 13: iBeacon iOS Dev Scout October 2013 Talk

How Does It Work?

• Technical Alert!

Friday, 25 October, 13

Page 14: iBeacon iOS Dev Scout October 2013 Talk

How Does It Work?

• Part of new iOS 7 APIs for Core Location

Friday, 25 October, 13

Page 15: iBeacon iOS Dev Scout October 2013 Talk

How Does It Work?

• Part of new iOS 7 APIs for Core Location

• Not Core Bluetooth

Friday, 25 October, 13

Page 16: iBeacon iOS Dev Scout October 2013 Talk

Region Monitoring

[locationManager startMonitoringRegion: ];

Friday, 25 October, 13

Page 17: iBeacon iOS Dev Scout October 2013 Talk

Region Monitoring

• You need a UUID for each retail store chain

=> 2D0FAF26-F178-449D-8EC2-C7DFA3D6EF2D

Friday, 25 October, 13

Page 18: iBeacon iOS Dev Scout October 2013 Talk

Setup

$ uuidgen2D0FAF26-F178-449D-8EC2-C7DFA3D6EF2D

Friday, 25 October, 13

Page 19: iBeacon iOS Dev Scout October 2013 Talk

Setup- (id)init {

if (self = [super init]) {

_gettingRealUUID = [[NSUUID alloc] initWithUUIDString:@”2D0FAF26-F178-449D-8EC2-C7DFA3D6EF2D”];

_gettingRealId = @”Getting Real Store”;

_locationManager = [[CLLocationManager alloc] init];

_locationManager.delegate = self;

}

return self;

}

Friday, 25 October, 13

Page 20: iBeacon iOS Dev Scout October 2013 Talk

Listening For iBeacons- (void)startMonitoringForStores {

CLBeaconRegion *region = [[CLBeaconRegion alloc] initWithProximityUUID:self.gettingRealUUID identifier:self.gettingRealId]];

[_locationManager startMonitoringForRegion:region];

}

Friday, 25 October, 13

Page 21: iBeacon iOS Dev Scout October 2013 Talk

CLBeaconRegion

CLRegion

Friday, 25 October, 13

Page 22: iBeacon iOS Dev Scout October 2013 Talk

CLBeaconRegion

CLRegion

CLBeaconRegion

Friday, 25 October, 13

Page 23: iBeacon iOS Dev Scout October 2013 Talk

Listening For iBeacons-(void)locationManager:(CLLocationManager *)manager didEnterRegion:(CLRegion *)region {

if ([region.identifier isEqualToString:self.gettingRealId]) {

// Show notification to user

}

}

Friday, 25 October, 13

Page 24: iBeacon iOS Dev Scout October 2013 Talk

Listening For iBeacons- (void)startMonitoringForStores {

CLBeaconRegion *region = [[CLBeaconRegion alloc] initWithProximityUUID:self.gettingRealUUID identifier:self.gettingRealId]];

region.notifyOnEntry = YES;

region.notifyOnExit = YES;

region.notifyEntryStateOnDisplay = YES;

[_locationManager startMonitoringForRegion:region];

}

Friday, 25 October, 13

Page 25: iBeacon iOS Dev Scout October 2013 Talk

Getting Real Store

• Using proximity to display relevant data - catalog vs product details

Friday, 25 October, 13

Page 26: iBeacon iOS Dev Scout October 2013 Talk

iBeacon Ranging

Friday, 25 October, 13

Page 27: iBeacon iOS Dev Scout October 2013 Talk

iBeacon Ranging

Friday, 25 October, 13

Page 28: iBeacon iOS Dev Scout October 2013 Talk

iBeacon Ranging

Immediate

Friday, 25 October, 13

Page 29: iBeacon iOS Dev Scout October 2013 Talk

iBeacon Ranging

Immediate

Near

Friday, 25 October, 13

Page 30: iBeacon iOS Dev Scout October 2013 Talk

iBeacon Ranging

Immediate

Near

Far

Unknown

Friday, 25 October, 13

Page 31: iBeacon iOS Dev Scout October 2013 Talk

Start Ranging- (void)locationManager:(CLLocationManager *)manager didEnterRegion:(CLRegion *)region {

[self.manager startRangingBeaconsInRegion:region];

}

Friday, 25 October, 13

Page 32: iBeacon iOS Dev Scout October 2013 Talk

CLManagerDelegate- (void)locationManager:(CLLocationManager *)manager didRangeBeacons:(NSArray *)beacons inRegion:(CLBeaconRegion *)region {

if ([beacons count] > 0) {

CLBeacon *nearestBeacon = [beacons firstObject];

if (nearestBeacon.proximity == CLProximityImmediate) {

[self showRelevantProductDetails];

}

}

}

Friday, 25 October, 13

Page 33: iBeacon iOS Dev Scout October 2013 Talk

Stop Ranging- (void)locationManager:(CLLocationManager *)manager didExitRegion:(CLRegion *)region {

[self.locationManager stopRangingForRegion:region];

[self hideStoreCatalog];

}

Friday, 25 October, 13

Page 34: iBeacon iOS Dev Scout October 2013 Talk

CLBeacon@interface CLBeacon

@property (readonly, nonatomic) NSUUID *proximityUUID;

@property (readonly, nonatomic) CLProximity proximity;

@property (readonly, nonatomic) NSNumber *major;

@property (readonly, nonatomic) NSNumber *minor;

typedef NS_ENUM(NSInteger, CLProximity) {

CLProximityUnknown,

CLProximityImmediate,

CLProximityNear,

CLProximityFar,

};

Friday, 25 October, 13

Page 35: iBeacon iOS Dev Scout October 2013 Talk

Differentiating StoresCLBeacon *nearestBeacon = [beacons firstObject];

if (nearestBeacon.major == kGettingRealStoreBuonaVista) {

// Give a cookie

} else if (nearestBeacon.major == kGettingRealStoreOrchard) {

// Sell overpriced goods

}

Friday, 25 October, 13

Page 36: iBeacon iOS Dev Scout October 2013 Talk

Within A StoreCLBeacon *nearestBeacon = [beacons firstObject];

if (nearestBeacon.minor == kStoreEntrance) {

// Show Promotions

} else if (nearestBeacon.minor == kStoreWomenSection) {

// Show Women Catalog

} else if (nearestBeacon.minor == kStoreExit) {

// Thank them for their visit, give promo code and offer option to checkout

}

Friday, 25 October, 13

Page 37: iBeacon iOS Dev Scout October 2013 Talk

Turning an iOS Device into an iBeacon

CLBeaconRegion *region = [[CLBeaconRegion alloc] initWithProximityUUID:self.gettingRealUUID major:storeNumber minor:storeEntrance identifier:self.gettingRealId]];

NSDictionary *peripheralData = [region peripheralDataWithMeasuredPower:nil];

[self.peripheralManager startAdvertising:peripheralData];

Friday, 25 October, 13

Page 38: iBeacon iOS Dev Scout October 2013 Talk

Conclusion

• iBeacon has the potential to transform indoor navigation and local commerce

Friday, 25 October, 13

Page 39: iBeacon iOS Dev Scout October 2013 Talk

Conclusion

• iBeacon will transform indoor navigation and local commerce

• As developers, let your imagination run wild and build interesting apps

Friday, 25 October, 13

Page 40: iBeacon iOS Dev Scout October 2013 Talk

Shoutout!

• If the technical talk interests you, and you are interested to solve interesting mobile commerce problems..

Friday, 25 October, 13

Page 41: iBeacon iOS Dev Scout October 2013 Talk

Shoutout!

• WE ARE HIRING! Come say hi after the talk :)

Friday, 25 October, 13

Page 42: iBeacon iOS Dev Scout October 2013 Talk

Thank You!

Gabriel Lim

Co-Founder

Getting Real Software

[email protected]

Friday, 25 October, 13