Jlexyc
Jlexyc

Reputation: 517

Alamofire 4.0.1 Undefined symbols for architecture x86_64 xCode 8 SWIFT 3

My project worked perfectly with cocoapods 1.0.1 and Alamofire branch "swift3". But today i've updated cocoapods to 1.1.0 and updated alamofire to version 4.0.1 from Master branch and got linker error for x86-64 (simulator) build:

Undefined symbols for architecture x86_64: Alamofire.request (Alamofire.URLConvertible, method : Alamofire.HTTPMethod, parameters : [Swift.String : Any]?, encoding : Alamofire.ParameterEncoding, headers : [Swift.String : Swift.String]?) -> Alamofire.DataRequest", referenced from

protocol witness table for Swift.String : Alamofire.URLConvertible in Alamofire", referenced from:

But for device (arm targets) everything works well.

Tried to deintegrate pods, remove all scripts and folders and install again - but it didn't help.

Upvotes: 1

Views: 2831

Answers (2)

Jlexyc
Jlexyc

Reputation: 517

Got the solution:

Had to remove derivedData manually and restart xCode after clean.

(Facepalm)

Upvotes: 5

Lloyd Roseblade
Lloyd Roseblade

Reputation: 121

Try

sudo gem install cocoapods --pre

And the install your pods again

Alternatively, remove the pods and use Swift Package Manager instead.

Upvotes: 0

Related Questions