I have BLE source code that displays several warnings and I am new to BLE. Please see the code below. I have tried replacing with readRSSI but tells me I can’t compare an Int with Void. How do I get an Int value for readRSSI? Or how should I change the code?
- (void)peripheralDidUpdateRSSI:(CBPeripheral * _Nonnull)peripheral error:(NSError * _Nullable)error
{
if (!isConnected)
return;
if (rssi != peripheral.RSSI.intValue)
{
rssi = peripheral.RSSI.intValue;
[[self delegate] bleDidUpdateRSSI:activePeripheral.RSSI];
}
}
*rssi is a static int.
*isConnected is a boolean.
Edit: The problem is that RSSI is deprecated since iOS 8.0.