I am trying to replicate an Android App I already made to iOS. I'm trying to make a BLE application where my iOS Device would be able to see and connect to BLE Devices and get the RSSI (I really don't care about the message and other data). Upon a search research, I found this BLTE Central Peripheral Transfer Examplein the iOS Developer Library. Upon downloading, opening the XCode Project, and then ran it. However, I ran into an error shorty after with this code:
if (!self.discoveredPeripheral.isConnected) {
return;
}
where the error is: Property 'isConnected' not found on object of type 'CBPeripheral'
Upon searching again, I found this link. However, it seems that the thread does not have any solutions as the answers discussed also seem to be deprecated. I can't seem to find any solutions for this issue as well.
Has anyone tried to make the code from the iOS developer library work?
The documentation says
Deprecation Statement
Use the state property instead.
isConnected
has been deprecated, try this code instead
if (self.discoveredPeripheral.state != CBPeripheralStateConnected) {
return;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With