Skip to content

Commit

Permalink
call completion handlers on the main thread
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewBarba committed Jan 26, 2018
1 parent f7a0ecb commit 8d85285
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ Change Log

---

## [1.0.0-beta13](https://github.com/AndrewBarba/lisk-swift-sdk/releases/tag/1.0.0-beta13)

1. Call all completion handlers on the main thread

## [1.0.0-beta12](https://github.com/AndrewBarba/lisk-swift-sdk/releases/tag/1.0.0-beta12)

1. Generate secure, 12 word, random passphrases
Expand Down
2 changes: 1 addition & 1 deletion Lisk.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'Lisk'
s.version = '1.0.0-beta12'
s.version = '1.0.0-beta13'
s.summary = 'Swift 4 library for Lisk - the cryptocurrency and blockchain application platform'
s.homepage = 'https://github.com/AndrewBarba/lisk-swift'
s.documentation_url = 'https://andrewbarba.github.io/lisk-swift/'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<key>Ed25519PackageDescription.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>1</integer>
<integer>2</integer>
</dict>
<key>Lisk-Package.xcscheme_^#shared#^_</key>
<dict>
Expand All @@ -17,7 +17,7 @@
<key>LiskPackageDescription.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>2</integer>
<integer>1</integer>
</dict>
<key>LiskPackageTests.xcscheme</key>
<dict>
Expand Down
2 changes: 1 addition & 1 deletion Sources/Core/APIClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public struct APIClient {
private func dataTask<R>(_ request: URLRequest, completionHandler: @escaping (Response<R>) -> Void) -> URLSessionDataTask {
let task = urlSession.dataTask(with: request) { data, _, _ in
let response: Response<R> = self.processRequestCompletion(data)
completionHandler(response)
DispatchQueue.main.async { completionHandler(response) }
}
task.resume()
return task
Expand Down

0 comments on commit 8d85285

Please sign in to comment.