saltedge / saltedge-ios

A handful of classes to help you interact with the Salt Edge API from your iOS app
https://www.saltedge.com
MIT License
1 stars 4 forks source link

Fix completion dispatch_async calls in SERequestHandler #88

Closed nemesis closed 6 years ago

nemesis commented 6 years ago

Reference: issue #87

This pull request migrates the dispatch_async(dispatch_get_main_queue(), ^{}) calls from SERequestHandler to SEAPIRequestManager, since serializing JSON into respective objects was happening on the main queue and that was causing issues. Now, the serializing happens before the request's completion is called, and then the completion with serialized objects is dispatched to the main queue.

See the difference: before and after