Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define TRANSFER_CHARACTERISTIC_UUID @"08590F7E-DB05-467E-8757-72F6FAEB13D4"
- - (void)peripheral:(CBPeripheral *)peripheral didDiscoverCharacteristicsForService:(CBService *)service error:(NSError *)error
- {
- // Again, we loop through the array, just in case.
- for (CBCharacteristic *characteristic in service.characteristics) {
- // And check if it's the right one
- if ([characteristic.UUID isEqual:[CBUUID UUIDWithString:TRANSFER_CHARACTERISTIC_UUID]]) {
- // If it is, subscribe to it
- [peripheral setNotifyValue:YES forCharacteristic:characteristic];
- }
- }
- // Once this is complete, we just need to wait for the data to come in.
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement