First of all.
In your code, you are calling:
_myCentralManager = [[CBCentralManager alloc] initWithDelegate:self queue:nil];
[_myCentralManager scanForPeripheralsWithServices:nil options:nil];
in viewDidLoad. this is a mistake. You should call scanForPeripheralsWithServices:options:
into centralManagerDidUpdateState:
and only in the scenario where state == CBCentralManagerStatePoweredOn
Second:
It is a good practice to assign your discovered peripheral to a retained CBPeripheral
into centralManager: didConnectPeripheral:
like:
self.myPeripheral = peripheral;
self.myPeripheral.delegate = self;
Third
peripheral: didUpdateValueForCharacteristic: error:
is invoked by:
readValueForCharacteristic:
setNotifyValue: forCharacteristic
It is really weird why readValueForCharacteristic:
is not invoking peripheral: didUpdateValueForCharacteristic: error:
, also maybe there is some extra problem.
Can you try to call setNotifyValue: forCharacteristic
and see what happen?
BTW, the best CoreBluetooth tutorial is the Apple Core Bluetooth Programming Guide