-
Notifications
You must be signed in to change notification settings - Fork 354
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scanning Does not return anything in iOS Background Mode #436
Comments
And it does work in foreground? |
Yes, It works in foreground. |
Are you using a 'default' service UUID? I don't think custom UUIDs are allowed from what I remember.... |
Hi @randdusing |
@TobiasFP |
Hi Orhan. I am able to sometimes scan for the UUID, but make sure to use the "restoreKey" in the initialize function. |
@orhan-swe Btw. a non-custom uuid is a uuid with a certain specific functionality, you can see the specifications here: |
Thanks for the answer. I will check if we can change the UUID. Though we did manage to get background scanning to work on ios also. I think the issue was that we did not have UIBackgroundModes enabled in info.plist , once we added "bluetooth-central" it started to work. This is how it looks:
The background scan may sometimes take more than 5 seconds before it finds our device, this is not good but I am not sure we can do anything about that. We are not setting restoreKey, I will check to see if it does change anything. |
I am trying to scan my BLE device in background mode with ServiceUUID specified in startScan() method. But, iOS can not scan it in background.
My ionic info
global packages:
local packages:
System:
Cordova plugins installed on my system :
cordova-plugin-background-mode 0.7.2 "BackgroundMode"
cordova-plugin-background-mode-bluetooth-central 1.0.0 "Bluetooth Central Background Mode"
cordova-plugin-bluetoothle 4.4.0 "Bluetooth LE"
cordova-plugin-mauron85-background-geolocation 2.2.5 "CDVBackgroundGeolocation"
The text was updated successfully, but these errors were encountered: