ld: framework not found KIF - ONLY when testing on a real device

As the title says I get the following error:

Showing Recent Messages ld: framework not found KIF

error: cannot parse the debug map for "/Users/[User]/Library/Developer/Xcode/DerivedData/[App]/Build/Products/Debug-iphoneos/[App].app/PlugIns/[AppTests].xctest/[AppTests]": No such file or directory

Strangely enough the above happens only on a real device and only when I test the app.

I use swift 3 & Xcode 8, and this is my

Podfile
:



platform :ios, '10.0'

use_frameworks!

target 'TrueThat' do

pod 'Alamofire', '~> 4.4'

pod 'KeychainAccess'

pod 'Kingfisher', '~> 3.0'

pod 'ReactiveCocoa', '~> 6.0'

pod 'SwiftyBeaver'

pod 'SwiftyJSON'


target 'TrueThatTests' do

inherit! :search_paths

pod 'KIF'

pod 'Nimble', '~> 7.0.1', :inhibit_warnings => true

pod 'OHHTTPStubs'

pod 'OHHTTPStubs/Swift'

end


target 'TrueThatUITests' do

inherit! :search_paths

pod 'Nimble', '~> 7.0.1', :inhibit_warnings => true

pod 'OHHTTPStubs'

pod 'OHHTTPStubs/Swift'

end

end