Alamofire4 migration, Apple Mach-O Linker (id) Error

时光总嘲笑我的痴心妄想 提交于 2019-12-02 22:11:50

问题


After spending weeks migrating all my Alamofire code to AF4/Swift3, I finally fixed all the complier errors due to Alamofire Function changes, but now when I try to build a I get a whole bunch of these Apple Mach-O errors.

There's at least 29 of them and they all have either Alamofire or AlamofireImage in them (aside from the last one which is "Linker command failed with exit code 1"). I don't have a clue of what to do here, I'll post any extra info needed, can anyone help me out here?

edit: Here are the first 3 errors, I copied only the parts highlighted in red. I will post the full log if necessary but its huge. Maybe this is enough for someone to figure out what's going on, if not, let me know!

All errors are under Undefined symbols for architecture arm64:

  "Alamofire.DataRequest.validate <A where A: Swift.Sequence, A.Iterator.Element == Swift.Int> (statusCode : A) -> Self", referenced from:

--

"Alamofire.(request (Alamofire.URLConvertible, method : Alamofire.HTTPMethod, parameters : [Swift.String : Any]?, encoding : Alamofire.ParameterEncoding, headers : [Swift.String : Swift.String]?) -> Alamofire.DataRequest).(default argument 1)", referenced from:

--

"Alamofire.(upload (multipartFormData : (Alamofire.MultipartFormData) -> (), usingThreshold : Swift.UInt64, to : Alamofire.URLConvertible, method : Alamofire.HTTPMethod, headers : [Swift.String : Swift.String]?, encodingCompletion : (Alamofire.SessionManager.MultipartFormDataEncodingResult) -> ()?) -> ()).(default argument 1)", referenced from:

回答1:


So the trick for me at least isn't to clean build, but to "Clean Build Folder". Open the Product menu drop down in Xcode and hold Option, and "Clean" turns into "Clean Build Folder"



来源:https://stackoverflow.com/questions/42058835/alamofire4-migration-apple-mach-o-linker-id-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!