我的.travis.yml
文件:
language: objective-c
before_install:
- rvm use system
- sudo gem install cocoapods -v '0.39.0'
script:
xctool -workspace ProjectName.xcworkspace -scheme ProjectName build -sdk iphonesimulator
虽然Travis-CI正在构建项目,但我遇到了多个错误:
- (instancetype __nonnull)initWithConfiguration:(NSURLSessionConfiguration *__nullable)configuration NS_DESIGNATED_INITIALIZER;
^
- (instancetype __nonnull)initWithConfiguration:(NSURLSessionConfiguration *__nullable)configuration NS_DESIGNATED_INITIALIZER;
^
因此Travis Xcode抱怨与__nonnull
答案 0 :(得分:2)
要解决这个问题,我在.travis.yml
文件中使用此行强制Travis Xcode为7.2版本:
osx_image: xcode7.2
所以我的最终.travis.yml
文件是:
我的.travis.yml
文件:
language: objective-c
osx_image: xcode7.2
before_install:
- rvm use system
- sudo gem install cocoapods -v '0.39.0'
script:
xctool -workspace ProjectName.xcworkspace -scheme ProjectName build -sdk iphonesimulator
正如我在另一篇answer中所说,sudo gem install cocoapods -v '0.39.0'
也迫使特拉维斯使用所需的Cocoapods版本