Bug 29030 - scanForPeripheralsWithServices method is not discovering 10-15 CBUUID array of peripherals in background
Summary: scanForPeripheralsWithServices method is not discovering 10-15 CBUUID array o...
Alias: None
Product: iOS
Classification: Xamarin
Component: General ()
Version: XI 8.9.x (iOS 8.3)
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2015-04-13 08:28 UTC by praveen.jh@globallogic.com
Modified: 2015-04-14 01:58 UTC (History)
2 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description praveen.jh@globallogic.com 2015-04-13 08:28:25 UTC
I am working on a BLE iOS mobile app where I am trying to scan for peripherals
with specific service UUID. As per iOS SDK I need to call
"scanForPeripheralsWithServices" method for that. I am passing 10-15 Service UUID in “scanForPeripheralsWithServices” method. 
It is working fine in foreground but in background it is discovering only first 6 peripherals from the CBUUID array. 

Below is the code that I call to start scanning for peripherals having the
service UUID that my app is interested in. "DiscoveredPeripheral" callback
method in NOT invoked in this case. However, if App comes in foreground then it will discover all the listed peripherals.

 CBUUID []ServiceCBUUID =new CBUUID[10];
Passing list of UUID’s in this array
  if (CentralManager.State == CBCentralManagerState.PoweredOn)
Comment 1 Rolf Bjarne Kvinge [MSFT] 2015-04-13 08:41:57 UTC
This doesn't sound like a problem with Xamarin.iOS (we're just a thin binding around the Objective-C API).

My suggestion would be to create a simple Objective-C app (this is trivially done by modifying an existing Objective-C CoreBluetooth sample app) to test, and then report this to Apple (or in their forums).

If you however find that it works fine with with Objective-C, please reopen and attach both your Xamarin and your Objective-C projects and we'll have a look.
Comment 2 praveen.jh@globallogic.com 2015-04-14 01:58:55 UTC