iosswiftalamofirecarthage

Alamofire 5 showing error after installing it with Carthage, "'Alamofire has no member named request"


I've installed Alamofire 5 using Carthage, and it keeps showing error that it has no member request.

   Alamofire.request(route).responseJSONDecodable { response in }

Module 'Alamofire' has no member named 'request'


Solution

  • You are using Alamofire 5 then you should use AF.request instead of Alamofire.request. Check out usage example here.