0

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:
4

1 回答 1

1

所以至少对我来说,诀窍不是清理构建,而是“清理构建文件夹”。在Xcode中打开Product菜单下拉并按住Option,“Clean”变成“Clean Build Folder”

于 2017-02-08T23:13:38.037 回答