iBeacon #yidev

  • View
    14.670

  • Download
    2

Embed Size (px)

DESCRIPTION

yideviBeaconTranscriptblog

Transcript

  • 1. iBeacon @nolili #yidev

2. http://gigazine.net/news/20130911-ibeacon/ 3. ! 4. Y^Y^Y^Y 5. 3 6. Bluetooth LE! ! iOS) 7. ID 200ID 300 ID 100 8. UUIDUUID UUID 9. UUID! 7A1275A4-78B1-4A18-888E-21F550CFB0FE 10. RegionMonitoringRangingCongure 11. RegionMonitoringUUID xxxx BeaconRangingUUID xxxx BeaconCongureiPhoneBeacon 12. RegionMonitoring UUID xxxx Beacon 13. CLLocationManager -(void)startMonitoringForRegion:(CLRegion *)region 14. CLBeaconRegion - (id)initWithProximityUUID:(NSUUID *)proximityUUID identifier:(NSString *)identifier;NSUUID! 7A1275A4-78B1-4A18-888E-21F550CFB0FE 15. $ uuidgen 7A1275A4-78B1-4A18-888E-21F550CFB0FE 16. CLLocationManagerDelegate - (void)locationManager:(CLLocationManager *)manager didEnterRegion:(CLRegion *)region - (void)locationManager:(CLLocationManager *)manager didExitRegion:(CLRegion *)regionNSUUID! 7A1275A4-78B1-4A18-888E-21F550CFB0FEdidEnterRegiondidExitRegion 17. CLLocationManager - (void)requestStateForRegion:(CLRegion *)region!CLLocationManagerDelegate - (void)locationManager:(CLLocationManager *)manager didDetermineState: (CLRegionState)state forRegion:(CLRegion *)regionNSUUID! 7A1275A4-78B1-4A18-888E-21F550CFB0FE CLRegionStateInsideCLRegionStateOutside 18. 191D6287-2135-4538-97BF-AB1FFEB8-4020-43C2-9509-EB5F75E4-EF03-405F-A543-BCDBAB5ECF8B9-01D7-4EAE-8D53-2486DA4CUUIDA AAB93F62E2FA04B8781AA6D4C514ADBAC930B53AB3D9 19. CLBeaconRegion - (id)initWithProximityUUID:(NSUUID *)proximityUUID identifier:(NSString *)identifier;!- (id)initWithProximityUUID:(NSUUID *)proximityUUID major:(CLBeaconMajorValue)major identifier:(NSString *)identifier;!- (id)initWithProximityUUID:(NSUUID *)proximityUUID major:(CLBeaconMajorValue)major minor:(CLBeaconMinorValue)minor identifier:(NSString *)identifier;NSUUID! 7A1275A4-78B1-4A18-888E-21F550CFB0FE CLBeaconMajorValue! CLBeaconMinorValue! 20. Proximity UUIDMajor NumberMinor Number A:0:0B:1 C:2iOS 7A1275A4-78B1-4 A18-888E-21F550C FB0FEA:0 :1B:1 C:2 D:3:2 :3A:0 A:0 B:1 21. Proximity UUIDMajor NumberMinor Number A:0:0B:1 C:2iOS 7A1275A4-78B1-4 A18-888E-21F550C FB0FEA:0 :1B:1 C:2 D:3:2 :3A:0 A:0 B:1 22. CLBeaconRegion - (id)initWithProximityUUID:(NSUUID *)proximityUUID identifier:(NSString *)identifier;!- (id)initWithProximityUUID:(NSUUID *)proximityUUID major:(CLBeaconMajorValue)major identifier:(NSString *)identifier;!- (id)initWithProximityUUID:(NSUUID *)proximityUUID major:(CLBeaconMajorValue)major minor:(CLBeaconMinorValue)minor identifier:(NSString *)identifier;NSUUID! 7A1275A4-78B1-4A18-888E-21F550CFB0FE CLBeaconMajorValue! 3 CLBeaconMinorValue! 1 23. Proximity UUIDMajor NumberMinor Number A:0:0B:1 C:2iOS 7A1275A4-78B1-4 A18-888E-21F550C FB0FEA:0 :1B:1 C:2 D:3:2 :3A:0 A:0 B:1 24. Ranging UUID xxxx Beacon 25. NSUUID! 7A1275A4-78B1-4A18-888E-21F550CFB0FE CLBeaconMajorValue! 3 CLBeaconMinorValue! 1iOS! Device 26. CLLocationManager - (void)startRangingBeaconsInRegion:(CLBeaconRegion *)region; - (void)stopRangingBeaconsInRegion:(CLBeaconRegion *)region;NSUUID! 7A1275A4-78B1-4A18-888E-21F550CFB0FE CLBeaconMajorValue! 3 CLBeaconMinorValue! 1iOS! DeviceCLProximityUnknown,! CLProximityImmediate,! CLProximityNear,! CLProximityFar 27. CLLocationManager - (void)locationManager:(CLLocationManager *)manager didRangeBeacons:(NSArray *)beacons inRegion:(CLBeaconRegion *)regionCLBeaconNSUUID! 1275A4-78B1-4A18-888E-21F550CFB0FE CLBeaconMajorValue! 3 CLBeaconMinorValue! 1proximityUUID! major! minor! proximity! accuracy! rssi! 28. CLLocationManager - (void)locationManager:(CLLocationManager *)manager didRangeBeacons:(NSArray *)beacons inRegion:(CLBeaconRegion *)regionCLBeacon !typedef {! CLProximityUnknown,! CLProximityImmediate,! CLProximityNear,! CLProximityFar! } CLProximity;!proximityUUID! major! minor! proximity! accuracy! rssi! 29. Congure iPhoneBeacon 30. Estimote 31. iPhone 32. CLBeaconRegion - (NSMutableDictionary *)peripheralDataWithMeasuredPower:(NSNumber *)measuredPower;!CBPeripheralManager - (void)startAdvertising:(NSDictionary *)advertisementData;iOS! Device 33. NFC!!! iBeacon 34. Bluetooth LE! ! iOS) 35. Apple Inc.! ! 36. 37. Passbook 38. https://developer.apple.com/library/ios/documentation/UserExperience/Reference/PassKit_Bundle/Chapters/LowerLevel.html#//apple_ref/doc/uid/TP40012026-CH3-SW4 39. UUID! 7A1275A4-78B1-4A18-888E-21F550CFB0FE 40. HW specication 41. Bluetooth 4.0 LE 42. Bluetooth 4.0! Low EnergyHR! ANT+!Bluetooth 2.0,3.0! Classic! Dualmode 43. Bluetooth 4.0! Low Energy 44. Service, Device Name, UUIDBluetooth 4.0! Low Energy 45. Bluetooth LE Advertisement Packet ScannerLE Advertisement DataAdvertiserADV_IND ADV_IND ADV_INDLE Advertisement DataADV_IND ADV_IND ADV_IND 46. PreambleAdvertisement PacketAdvertising Access Address Header Payload Length AdvAAdvertising Data! CRC 47. PreambleAdvertisement PacketAdvertising Access Address Header Payload Length AdvAlength Advertising Data! manufacture ag connectable/nonconnectable UUIDCRCMajorMinorPower 48. Index00x02ad eld length10x01ad eld type20x06connectable/undirect30x1Aad eld length40xFFmanufacturer data ag50x4C manufacturer(Apple)60x0070x02 Magic Number80x1590x990x99240x9925proximityUUID (128bit0x01 Major Number 16bit 16bit Little Endian260x01270x01 Minor Number 16bit 16bit Little Endian280x01290xCAPower (iBeacon1iOSRSSI 2 49. Robin Heydon Bluetooth Low Energy: The Developer's Handbook, p.85 50. APAppleApple Retail StoreiOS 7iBeacon Mac blog http://www.macotakara.jp/blog/apple_store/entry-21958.html 51. Apple Inc.! !