Reputation: 11
In our iOS application (built with .NET Maui) we like to show a popup when the iOS device does not support scan for extended advertisings.
In the CoreBluetooth documentation there is a method "supports" in the CBCentralManager (=> in Maui it is CBCentralManager.SupportsFeatures) that gives back if the hardware supports this feature.
That sounds fine, but while using we see an unexpected behavior the the information we get back by thims method changes during app runtime.
There is a older topic here at stack support that refers to this method, but it doesn't cover any behaviors of it. => Link
We did a our tests with a .NET Maui app running on an iPhone 14 with iOS 18.0.1.
If we check the feature at startup of our app (right after creating our instance of CBCentralManager) it tells us that the feature is not supported. Later after the first state change to PowerOn state, still it tells us that the feature not supported. A few seconds later just before we try to start a scan the feature is supported.
Did someone else see the same behavior? Is it releated to Maui or Xamarin (there it behaves equally)? Is there a way to force the correct readback?
To summarize:
Problem: Why does the API return false at startup an later the expected value true?
Upvotes: 0
Views: 65