Estimote / iOS-Proximity-SDK

Estimote Proximity SDK for iOS
https://developer.estimote.com
Apache License 2.0
61 stars 26 forks source link

Is there a way to observe for events on different threads? #61

Open danibachar opened 3 years ago

danibachar commented 3 years ago

It seems that the SDK forces the EPXProximityZone callback i.e @property(nonatomic, copy, readwrite, nullable) void (^onEnter)(EPXProximityZoneContext *zoneContext); and the others to be called back on the main thread. In cases where there are a lot of beacons near by this causes heavy usage on the app and in some cases, it's getting totally stuck ... From stack tracing it seems like Estimote SDK does most of the work on it's own thread com.estimote.EBSUniversalScanner.defaultQueue but then dispatch it back on to the main thread... I wish one of the two will happen: 1) The callback would come back on the thread it was registered to 2) I could inject/supply a queue which I'd like my EPXProximityZones to be observed on

Maybe there is such a case and I'm missing something? And also why is EPXProximityZone introduce the usage of UIKit is there a reason?

sdetweil commented 1 year ago

has this been addressed? my app will NEVER be on the UI thread when calling the sdk. This is Ionic Vue based.

I see this in the device log

Main Thread Checker: UI API called on a background thread: -[UIApplication applicationState]