Gabriel.Massana
Gabriel.Massana

Reputation: 8225

Travis-CI error with __nonnull

My .travis.yml file:

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

While Travis-CI is building the project I've got multiple errors like:

- (instancetype __nonnull)initWithConfiguration:(NSURLSessionConfiguration *__nullable)configuration NS_DESIGNATED_INITIALIZER;
                ^
- (instancetype __nonnull)initWithConfiguration:(NSURLSessionConfiguration *__nullable)configuration NS_DESIGNATED_INITIALIZER;
  ^

So Travis Xcode is complaining about something related to __nonnull

Upvotes: 0

Views: 46

Answers (1)

Gabriel.Massana
Gabriel.Massana

Reputation: 8225

To solve the problem I'm forcing the Travis Xcode to be version 7.2 with this line in the .travis.yml file:

osx_image: xcode7.2

So my final .travis.yml file is:

My .travis.yml file:

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

As I said in another answer, sudo gem install cocoapods -v '0.39.0' also forces Travis to use the desired Cocoapods version

I also wrote a post in my blog about Travis-CI.

Upvotes: 2

Related Questions