Reputation: 2543
I have this very simple iOS project. It's using Cocoapods for dependency management, and includes AFNetworking as one of its dependency. Currently, my project code is just doing a simple http GET request and the test (written using Specta) checks if it succeeds.
Now, I'm trying to CI it with Travis-CI. I've already checked out xctool CI tutorial and objective-c CI manual from Travis-CI, my current .travis-ci.yml is:
language: objective-c
xcode_project: Foobar.xcodeproj
xcode_schema: Foobar
The last output lines from CI console are:
The command "echo " Check out our documentation for more information: http://about.travis-ci.org/docs/user/languages/objective-c/"" exited with 0.
Done. Your build exited with 0.
It seems to me that nothing has been tested. There's definitely something wrong with my .travis.yml. So my questions are:
Foobar
or FoobarTests
?script: xctool ...
command?Click the + button and add each dependency to the project. CocoaPods will appear as a static library named Pods.
I cannot add Pods
project as a whole, but rather each independent projects. Is this right? And does it mean that I have to do each time I add a library to Podfile?
Upvotes: 3
Views: 1099
Reputation: 2543
I figured it out with the help of @Schemetrical 's comment above and, a review of my .travis.yml. There turns out to be a typo: xcode_schema
should be xcode_scheme
...
So, as a result, here's my .travis.yml:
language: objective-c
xcode_workspace: Foobar.xcworkspace
xcode_scheme: Foobar
For vanilla Cocoapods generated project/workspace, there's no such scheme called FoobarTests
, but rather only one named Foobar
. So this should answer questions 1-3 above.
For question 4, I added only two additional targets: Pods-Foobar
and Pods-FoobarTests
, and they should contain all dependencies from your Podfile.
Upvotes: 0