The current code I\'m having doens\'t seem to return anything, I can\'t find out what is causing the issue.
func getQuests(category: NSString, count: Int) -&
You need to make quests a property on your class, so that you can access it from within the async callback.
var quests = NSArray()
You're aren't going to be able to return the array, because it is async. Just remove the return type. When the callback fires, save the results to your array, and do whatever else you want to happen.
func getQuests(category: NSString, count: Int) {
Alamofire.request(.GET, apiUrlString, parameters: ["category": category, "count": count])
.responseJSON { (request, response, json, error) in
dispatch_async(dispatch_get_main_queue(), {
self.quests = json as NSArray
println(self.quests) #=> ()
})
}
}