Closed AnttiLaitinenVincit closed 7 years ago
I apologize for not seeing this sooner.
I agree, this is probably the most common use case for this type of request anyway. I've updated the SDK to version 1.0.2 which includes this change, as well as a way to specify your own queue in the initializer, should you need to.
I've also updated the podspec with this new version.
Thanks for reporting the issue!
The SDK seems to return results in a worker thread rather than the main thread. This is dangerous because it can cause e.g. race-conditions in non-threadsafe code (like the UI code) if the developer is unaware of this.
Code example:
Currently a workaround is to wrap the completion handler with DispatchQueue.main.async to switch back to the main thread.