Carthage引入RxSwift后运行报错

使用carthage引入RxSwift之后,运行报错:

1
2
3
4
5
6
7
dyld: Library not loaded: @rpath/XCTest.framework/XCTest

Referenced from: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/

Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/libswiftXCTest.dylib

Reason: image not found

解决方法:

Target->Build Phases -> Run Script -> input files里添加:

$(PLATFORM_DIR)/Developer/Library/Frameworks/XCTest.framework