使用本地运行的 Travis 运行测试时如何修复"Symbol not found: _NSURLSessionTransferSizeUnknown"?



命令xctool -workspace Foo.xcworkspace -scheme Foo -sdk macosx -configuration Debug test -test-sdk macosx在本地工作,所有测试通过。

使用Travis我会收到以下错误:

Failed to query the list of test cases in the test bundle: dlopen(/Users/travis/Library/Developer/Xcode/DerivedData/Foo-bvxkmfrwzzvtxgaeoosknyzjovjc/Build/Products/Debug/OS X Tests.xctest/Contents/MacOS/OS X Tests, 2): Symbol not found: _NSURLSessionTransferSizeUnknown
  Referenced from: /Users/travis/Library/Developer/Xcode/DerivedData/Foo-bvxkmfrwzzvtxgaeoosknyzjovjc/Build/Products/Debug/OS X Tests.xctest/Contents/MacOS/OS X Tests
  Expected in: /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
 in /Users/travis/Library/Developer/Xcode/DerivedData/Foo-bvxkmfrwzzvtxgaeoosknyzjovjc/Build/Products/Debug/OS X Tests.xctest/Contents/MacOS/OS X Tests
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
** TEST FAILED: 0 passed, 0 failed, 0 errored, 0 total ** (21121 ms)
The command "xctool -workspace Foo.xcworkspace -scheme Foo -sdk macosx -configuration Debug test -test-sdk macosx" exited with 1.

我的.travis.yml文件如下:

language: objective-c
before_install:
  - gem install cocoapods --no-ri --no-rdoc --no-document --quiet
  - brew update
  - brew uninstall xctool
  - brew install xctool
script:
  - xctool -workspace Foo.xcworkspace -scheme Foo -sdk macosx -configuration Debug test -test-sdk macosx

为什么会发生这种情况,我该如何解决?

travis当前不支持小牛,这是问题的根本原因。

在GitHub上正在跟踪对10.9的支持。

相关内容

最新更新