Skip to content
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

BLE Scanning Issue on iOS #70

Open
alessandrodestefani opened this issue Aug 2, 2024 · 2 comments
Open

BLE Scanning Issue on iOS #70

alessandrodestefani opened this issue Aug 2, 2024 · 2 comments

Comments

@alessandrodestefani
Copy link

I have trouble making the scanning work on IOS, i can't get any event on the scanning callback. The same code on Android and Windows is working perfectly. I have added the permission in the info.plist.

The code:

UniversalBle.onScanResult = (event) {
debugPrint("item found!");
};
await UniversalBle.startScan();

There is something that i am missing?

@rohitsangwan01
Copy link
Contributor

@alessandrodestefani have you tried example app ?

@alessandrodestefani
Copy link
Author

Ok, i have tried an empty project and also the example app.
I have found out that on IOS if you don't set UniversalBle.onAvailabilityChange = (state) {}; the first commend startScan will not fire (the global queue will register it and will empty), the second time it will work.

If you have set onAvailabilityChange it will work fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants