I have written a script similar to below code. I kept breakpoint inside the "dispatch_async", but it is not getting executed. What could be the issue here?
dispatch_async(dispatch_get_main_queue()) {
let array = response!.allObjects as! [NSArray]
XCTAssertNotEqual(array.count, 0, testPassed);
self.waitForExpectationsWithTimeout(10, handler: { (error: NSError?) -> Void in
if(error != nil) {
XCTFail("Failed with error: \(error)
}
})
}