ibeacon ios dev scout october 2013 talk
DESCRIPTION
Gabriel sharing about iOS7 iBeacon technology and how it has the potential to shape local commerce landscape and overtake NFC.TRANSCRIPT
iBeaconWhat’s new in iOS 7
Friday, 25 October, 13
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
What is iBeacon?
• An extremely accurate locating system
Friday, 25 October, 13
What is iBeacon?
• An extremely accurate locating system
• Runs on Bluetooth Low Energy (BLE)
Friday, 25 October, 13
What is iBeacon?
• An extremely accurate locating system
• Runs on Bluetooth Low Energy (BLE)
• Possibly the death of NFC
Friday, 25 October, 13
What Can It Do?
• Allow for extremely accurate ranging, even indoors
Friday, 25 October, 13
What Can It Do?
• Allow for extremely accurate ranging, even indoors
• Broadcast on a near-permanent basis - very power efficient
Friday, 25 October, 13
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
Why Does It Matter?
• iBeacon will transform local commerce
Friday, 25 October, 13
Why Does It Matter?
• iBeacon will transform local commerce
• Indoor navigation
Friday, 25 October, 13
Why Does It Matter?
• iBeacon will transform local commerce
• Indoor navigation
• Open standard - Bluetooth 4.0
Friday, 25 October, 13
Demo
• Use case - Getting Real Store
Friday, 25 October, 13
How Does It Work?
• Technical Alert!
Friday, 25 October, 13
How Does It Work?
• Part of new iOS 7 APIs for Core Location
Friday, 25 October, 13
How Does It Work?
• Part of new iOS 7 APIs for Core Location
• Not Core Bluetooth
Friday, 25 October, 13
Region Monitoring
[locationManager startMonitoringRegion: ];
Friday, 25 October, 13
Region Monitoring
• You need a UUID for each retail store chain
=> 2D0FAF26-F178-449D-8EC2-C7DFA3D6EF2D
Friday, 25 October, 13
Setup
$ uuidgen2D0FAF26-F178-449D-8EC2-C7DFA3D6EF2D
Friday, 25 October, 13
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
Listening For iBeacons- (void)startMonitoringForStores {
CLBeaconRegion *region = [[CLBeaconRegion alloc] initWithProximityUUID:self.gettingRealUUID identifier:self.gettingRealId]];
[_locationManager startMonitoringForRegion:region];
}
Friday, 25 October, 13
CLBeaconRegion
CLRegion
Friday, 25 October, 13
CLBeaconRegion
CLRegion
CLBeaconRegion
Friday, 25 October, 13
Listening For iBeacons-(void)locationManager:(CLLocationManager *)manager didEnterRegion:(CLRegion *)region {
if ([region.identifier isEqualToString:self.gettingRealId]) {
// Show notification to user
}
}
Friday, 25 October, 13
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
Getting Real Store
• Using proximity to display relevant data - catalog vs product details
Friday, 25 October, 13
iBeacon Ranging
Friday, 25 October, 13
iBeacon Ranging
Friday, 25 October, 13
iBeacon Ranging
Immediate
Friday, 25 October, 13
iBeacon Ranging
Immediate
Near
Friday, 25 October, 13
iBeacon Ranging
Immediate
Near
Far
Unknown
Friday, 25 October, 13
Start Ranging- (void)locationManager:(CLLocationManager *)manager didEnterRegion:(CLRegion *)region {
[self.manager startRangingBeaconsInRegion:region];
}
Friday, 25 October, 13
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
Stop Ranging- (void)locationManager:(CLLocationManager *)manager didExitRegion:(CLRegion *)region {
[self.locationManager stopRangingForRegion:region];
[self hideStoreCatalog];
}
Friday, 25 October, 13
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
Differentiating StoresCLBeacon *nearestBeacon = [beacons firstObject];
if (nearestBeacon.major == kGettingRealStoreBuonaVista) {
// Give a cookie
} else if (nearestBeacon.major == kGettingRealStoreOrchard) {
// Sell overpriced goods
}
Friday, 25 October, 13
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
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
Conclusion
• iBeacon has the potential to transform indoor navigation and local commerce
Friday, 25 October, 13
Conclusion
• iBeacon will transform indoor navigation and local commerce
• As developers, let your imagination run wild and build interesting apps
Friday, 25 October, 13
Shoutout!
• If the technical talk interests you, and you are interested to solve interesting mobile commerce problems..
Friday, 25 October, 13
Shoutout!
• WE ARE HIRING! Come say hi after the talk :)
Friday, 25 October, 13
Thank You!
Gabriel Lim
Co-Founder
Getting Real Software
Friday, 25 October, 13