Bug 15056 - CBCentralManager.ScanForPeripherals(Guid) throws exception
Summary: CBCentralManager.ScanForPeripherals(Guid) throws exception
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: 7.0.0.x
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2013-09-28 01:02 UTC by dj_technohead
Modified: 2013-10-07 16:57 UTC (History)
3 users (show)

Tags:
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:
Status:
RESOLVED FIXED

Description dj_technohead 2013-09-28 01:02:21 UTC
Passing in a guid to the ScanForPeripherals method results in a run time exception:

"Objective-C exception thrown.  Name: Invalid Object Reason: Argument 50890202-A8E5-FBFF-98FD-FBEFF8E5D3BF is invalid"
Comment 1 Sebastien Pouliot 2013-09-28 10:44:15 UTC
What happens if you try a CBUUID ?

>   var c = CBUUID.FromString ("50890202-A8E5-FBFF-98FD-FBEFF8E5D3BF"); 
>   var a = new CBUUID [] {c};
Comment 2 dj_technohead 2013-09-29 01:53:13 UTC
That appears to work (doesn't cause an exception). But I first tried the method that took a Guid and thought I should report the exception.
Comment 3 Sebastien Pouliot 2013-09-29 10:33:15 UTC
Its a good report :) I wanted to be sure the issue was with the Guid version (and not something else) since I know people are using this inside their applications.
Comment 4 Sebastien Pouliot 2013-09-30 10:15:58 UTC
The issue is that depending on how the `Guid` is created, from string or from a byte array, the internal representation will (or won't) match the one of `CBUUID`.

We're looking into this but, right now, you're better using `CBUUID` (and FWIW I think we should obsolete the old `Guid`API).
Comment 5 Sebastien Pouliot 2013-10-07 16:57:36 UTC
Guid overloads obsoleted in 5ccd237efc215c80daf3732c183e39b502f0962f