Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Module 'Alamofire' has no member named 'request'

Tags:

ios

alamofire

I'm new to iOS Development, I installed Alamofire as said in README, but I have this error as other users and I don't know how to solve it.

a busy cat

like image 902
user3579107 Avatar asked Feb 16 '15 20:02

user3579107


4 Answers

2019 UPDATE

If you have this error and you use 'alamofire5' branch just change Alamofire.request to AF.request.

like image 111
Said-Abdulla Atkaev Avatar answered Oct 20 '22 10:10

Said-Abdulla Atkaev


if you are using new Alamofire 5.xxx then you will use AF instead of Almofire it like that

AF.upload(multipartFormData: <#T##(MultipartFormData) -> Void#>, to: <#T##URLConvertible#>)

AF.request(<#T##url: URLConvertible##URLConvertible#>)

AF.download(<#T##url: URLConvertible##URLConvertible#>)
like image 21
Sultan Ali Avatar answered Oct 20 '22 11:10

Sultan Ali


I solved this issue by changing the Build Active Architectures Only settings.

Click on your project in the Project Explorer, select Build Settings, locate Architectures section, and change the Build Active Architecture Only setting to Yes for Debug and No for Release.

Hope this will work for you.

like image 12
Ethan Chen Avatar answered Oct 20 '22 10:10

Ethan Chen


Alamofire.xcodeproj -> Build Phases -> Complie Sources

If (0 item), then "[+] Alamofire.swift".

It's OK :)

like image 4
ton-katsu Avatar answered Oct 20 '22 11:10

ton-katsu