Skip to content

Commit

Permalink
changed Version to 1.2.2
Browse files Browse the repository at this point in the history
fixed callbacks on background thread
  • Loading branch information
sepbehroozi committed Aug 19, 2018
1 parent 800b47a commit 79d71c3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion AyanTechNetworkingLibrary.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |spec|
spec.name = "AyanTechNetworkingLibrary"
spec.version = "1.2.1"
spec.version = "1.2.2"
spec.summary = "Networking library for comunicate AyanTech web services"
spec.homepage = "https://github.com/AyanTech/AyanTechNetworkingLibrary-iOS"
spec.license = { type: 'MIT', file: 'LICENSE' }
Expand Down
13 changes: 7 additions & 6 deletions AyanTechNetworkingLibrary/Model/Server.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,14 @@ class Server {
req.task = URLSession.shared.dataTask(with: r as URLRequest) { (data, response, error) in
Utils.runOnMainThread {
UIApplication.shared.isNetworkActivityIndicatorVisible = false

if let responseString = String.init(data: data ?? Data(), encoding: .utf8) {
ATLog("RESPONSE", logData: "\(responseString)")
}

req.task = nil
responseHandler(data, response, error)
}
if let responseString = String.init(data: data ?? Data(), encoding: .utf8) {
ATLog("RESPONSE", logData: "\(responseString)")
}

req.task = nil
responseHandler(data, response, error)
}
req.task?.resume()
}
Expand Down

0 comments on commit 79d71c3

Please sign in to comment.