Something strange is happening. I have two ViewControllers A & B.
In both of them I have imported Alamofire using below command
import Alamofire
ISSUE: I am calling exactly the same Alamofire Request in both controller. In VC - A it executes, in VC - B --its just not executing..There is no error or anything. When I debug using breakpoints, the entire Alamofire code is getting skipped for some reason. Can't seem to figure out why.
Below is my Alamofire Code (THIS IS SAME in BOTH Controllers A & B)
override func viewDidLoad() {
super.viewDidLoad()
print("check1")
Alamofire.request(.GET, hubsURL).response { request, response, result, error in
print(response)
print("check2")
}
print("check"3)
}
The above code prints the response when ViewController A is executed but not for View Controller B. For viewcontroller B other commands are getting executed only Alamofire not getting executed.In the above code - "Check 1" & "Check 3" get printed to console but not "Check 2" (for VC - B).