Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Conquering CoreBluetooth, a Survival Guide

Conquering CoreBluetooth, a Survival Guide

Dan will dive into how Square Cash utilizes CoreBluetooth to allow their customers to send money to people who are nearby without exchanging a phone number, email address, or username, and without the recipient having to take their phone out of their pocket.

By Dan Federman https://www.linkedin.com/in/dsfed

Powered by http://xebia.com

do{iOS} conference

November 09, 2015
Tweet

More Decks by do{iOS} conference

Other Decks in Programming

Transcript

  1. Run Sharing App • Username • Current Heart Rate •

    Average Heart Rate • Distance • Elevation Gain • Average Speed
  2. Peripheral – Setup addService: [[CBMutableService alloc] initWithType:primary:] service.characteristics = @[

    characteristic1, … ] [[CBCharacteristic alloc] initWithType: properties: value: permissions:
  3. Peripheral – Sending Data request.value = abcdefghijklmnopqrstuvwxyz request.offset == 0

    request.value = klmnopqrstuvwxyz request.offset == 10 request.value = uvwxyz request.offset == 20
  4. BLE Advertising Packet Preamble (1 byte) Packet Type (4 bytes)

    Checksum (3 bytes) Header Payload 16 bytes 6 - 37 bytes