Travis-CI为什么找不到我的可可足动物依存关系?

bui*_*ded 3 travis-ci cocoapods

此Podspec在与pod 'SwiftyTimer', '~> 1.4'一起使用时失败Unable to find a specification for SwiftyTimer。它在本地安装良好。

我尝试过的事情:

  • 指定SwiftyTimer的确切URL(仍然找不到)
  • 手动集成SwiftyTimer(在我的下一个依赖项上失败,我真的很想不完全放弃依赖项的概念)

我的Podfile:

source 'https://github.com/CocoaPods/Specs.git'

platform :ios, '8.0'
use_frameworks!

target 'CWNotificationBanner_Example' do
  pod 'SwiftyTimer', '~> 1.4'
  pod 'CWNotificationBanner', :path => '../'

  target 'CWNotificationBanner_Tests' do
    inherit! :search_paths

    pod 'Quick', '~> 0.8'
    pod 'Nimble', '~> 3.0'
    pod 'FBSnapshotTestCase'
    pod 'Nimble-Snapshots'
  end
end
Run Code Online (Sandbox Code Playgroud)

我的travis.yml:

language: objective-c

podfile: Example/Podfile
before_install:
 - rvm install ruby-2.2.2 #cocoapods 1.0.0 requirement not yet supported ootb by travis
 - gem install cocoapods # Since Travis is not always on latest version
 - pod install --project-directory=Example
script:
 - set -o pipefail && xctool test -workspace Example/CWNotificationBanner.xcworkspace -scheme CWNotificationBanner-Example -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO | xcpretty
 - pod lib lint
Run Code Online (Sandbox Code Playgroud)

ort*_*rta 5

You might need to do a pod repo update to ensure that the Podspec is in the up-to-date repo.


bui*_*ded 5

答案原来是:osx_image在我的 .travis.yml中的密钥中指定一个 xcode 版本:

language: objective-c
osx_image: xcode7.3
xcode_workspace: Example/CWNotificationBanner.xcworkspace
xcode_scheme: CWNotificationBanner-Example
xcode_sdk: iphonesimulator9.3
podfile: Example/Podfile
Run Code Online (Sandbox Code Playgroud)