此Podspec在pod 'SwiftyTimer', '~> 1.4'
行Unable to find a specification for 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
我的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
答案 0 :(得分:5)
您可能需要执行pod repo update
以确保Podspec处于最新的回购中。
答案 1 :(得分:4)
结果是:在.travis.yml的osx_image
键中指定xcode版本:
language: objective-c
osx_image: xcode7.3
xcode_workspace: Example/CWNotificationBanner.xcworkspace
xcode_scheme: CWNotificationBanner-Example
xcode_sdk: iphonesimulator9.3
podfile: Example/Podfile
答案 2 :(得分:1)
在我的情况下,这是由于CI机器上没有Pod规范所致。要解决此问题,您需要在url()
文件中添加before_install
:
travis.yml