I am trying to use AlamoFire with Swift 1.2 in Xcode 6.3. I fixed most of the problems (i.e. changed them like!), But I have one that I cannot understand.
The following code - and similar snippets - generates a compile-time error with the message "Ambiguous use of" responseJSON "on line 5 (" req.responseJSON () {"). What do I need to change in the AlamoFire library or my code to fix this? Note I imported the project as described in the documentation, and it worked great in Swift 1.1 and Xcode 6.1.1.
func theaters(delegate:GlobalNetworkingDelegate){ if let url = self.mainNetworkingUrl{ var urlToUse = url + "theaters" var req:Request = Alamofire.request(.GET, urlToUse, parameters: [:], encoding: .URL) req.responseJSON(){ (req, response, jsonOut, error) in if(response.statusCode == 200 && error == nil){ var ajson = JSON(jsonOut!) delegate.globalTheatersOutomce!(true, json: jsonOut, error: error) } } } }
source share