The question is not for BLE device, its just normal bluetooth device.
currently my code works like this, I call the function :
[[EAAccessoryManager sharedAccessoryManager] showBluetoothAccessoryPickerWithNameFilter:nil completion:^(NSError *error)
{
}];
}
and it opens the popup with list of available Bluetooth device, then i click on my desired device and get an object and go ahead.
Is there any way that i can skip this picker step and directly get an object of my device?
No, it's not possible to connect without pairing first. The first time, you must have the user pair with the device either from the Settings app or from the picker. After the first pairing, however, you can skip the picker and get an
EAAccesory *
for your accessory, if the accessory is already connected to the iOS device. Here is how you can query the list of connected accessories:With the EAAccessory framework you can't initiate a connection to a device programmatically. For subsequent connections, you can have your device reconnect to the last connected device (if you control the firmware). This will trigger the
EAAccessoryDidConnectNotification
if your app is in the foreground, otherwise it will queue the notification and update the list of connected accessories.