Replies: 1 comment 3 replies
-
The Discussion says that the default is
Fair enough. However, then Apple issues the warning that @ajkahl mentions:
So, why would Apple choose a default that has an adverse effect on battery life? Apple's warning seems to imply the wrong impression that the filtering is Weird, because Apple clearly says that Apple Strange language choices. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I've a device that allows a couple of concurrent connections - which are usually a combination of a phone and a keyfob remote, or maybe a couple of phones. I've recently moved my app from flutter blue and have it mostly working well, bar one issue.
I first scan for the device, and if I come across one that has been saved (using an ID in the ad packet to avoid the iOS UUID transience) I attempt a connection, the device will then restart advertising after connecting if all of it's connections aren't used. Problem is iOS under the covers seems to claim all available connections to the device when I issue a connect, meaning that a second phone, or keyfob cannot connect.
This doesn't seem to be an issue on Android and I've tracked it down (can only guess how iOS uses it) to CBCentralManagerScanOptionAllowDuplicatesKey being set to true (in central.swift), with it set to false the problem seems to be gone. I'm not sure of the use case of duplicates when scanning, is there a reason it's set to true in this case? It seems it's false by default and carries a battery life warning - https://developer.apple.com/documentation/corebluetooth/cbcentralmanagerscanoptionallowduplicateskey
Cheers
Anthony
Beta Was this translation helpful? Give feedback.
All reactions