didDiscoverServices not being called
didDiscoverServices not being called
- Subject: didDiscoverServices not being called
- From: Don Clark <email@hidden>
- Date: Thu, 07 Aug 2014 10:06:02 -0400
- Acceptlanguage: en-US
- Thread-topic: didDiscoverServices not being called
I have an iOS app written in Objective-C that works, and am now working on an alternative, written in Swift. I can connect to my BLE device, but the call to discoverServices on the CBPeripheral never results in the callback to didDiscoverServices. My BLE delegate class implements CBPeripheralDelegate (along with CBCentralManagerDelegate):
class foobar: NSObject, CBCentralManagerDelegate, CBPeripheralDelegate {
The callback method is defined as:
func peripheral(peripheral: CBPeripheral!, didDiscoverServices error: NSError!) {
The app is running in an iPhone 4s running iOS 7.1.2. I have the Bluetooth Diagnostics profile installed, and the log produced shows that the service discovery is happening and that a message is going back to my app:
09:17:58.388 XpcConnection.cpp:1700 sendMsg XPC Notice Sending XPC message "CBMsgIdPeripheralServicesDiscovered" to session "com.onsetcomp.testapp-central-5033-180"
But the didDiscoverServices callback is never invoked. As I said, this is working in another app, written in Objective-C, with this same BLE device and iPhone, so I’m assuming I’ve just overlooked something silly. Ideas?
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Bluetooth-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden