M Faheem Rajput
M Faheem Rajput

Reputation: 778

iOS unit tests Swift compiler error with Alamofire

I am and trying to write some tests cases but my unit tests target fails to compile and gives me a compiler error.

The application is working perfectly, only the test cases are not working. enter image description here

Upvotes: 0

Views: 247

Answers (1)

ios_dev
ios_dev

Reputation: 379

If you wanna to use Alamofire in Unit and UI tests, you have to add the pod in the targets, just like that:

target 'PROJECTNAMEUnitTests' do
 use_frameworks!
    pod 'Alamofire', 'ALAMOFIRE_VERSION'
end

target 'PROJECTNAMEUITests' do
 use_frameworks!
    pod 'Alamofire', 'ALAMOFIRE_VERSION'
end

after that, run pod install again.

i hope it helps.

Upvotes: 2

Related Questions