Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2014
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. #define TRANSFER_CHARACTERISTIC_UUID @"08590F7E-DB05-467E-8757-72F6FAEB13D4"
  2.  
  3. - (void)peripheral:(CBPeripheral *)peripheral didDiscoverCharacteristicsForService:(CBService *)service error:(NSError *)error
  4. {
  5. // Again, we loop through the array, just in case.
  6. for (CBCharacteristic *characteristic in service.characteristics) {
  7.  
  8. // And check if it's the right one
  9. if ([characteristic.UUID isEqual:[CBUUID UUIDWithString:TRANSFER_CHARACTERISTIC_UUID]]) {
  10.  
  11. // If it is, subscribe to it
  12. [peripheral setNotifyValue:YES forCharacteristic:characteristic];
  13. }
  14. }
  15.  
  16. // Once this is complete, we just need to wait for the data to come in.
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement