Это cocoapod, который я создал с помощью pod lib create
в соответствии с руководством по cocoapods: https://guides.cocoapods.org/making/using-pod-lib-create.html. Структура каталога, файлы и пример проекта были сгенерированы для меня.
Мой .travis.ymlвыглядит так:
# references:
# * https://www.objc.io/issues/6-build-tools/travis-ci/
# * https://github.com/supermarin/xcpretty#usage
osx_image: xcode10.3
language: objective-c
# cache: cocoapods
xcode_workspace: Example/MUXSDKImaListener.xcworkspace
xcode_scheme: MUXSDKImaListener-Example
podfile: Example/Podfile
xcode_sdk: iphonesimulator9.3
before_install:
- gem install cocoapods # Since Travis is not always on latest version
- pod repo update
- pod install --project-directory=Example
script:
- set -o pipefail && xctool test -enableCodeCoverage YES -workspace Example/MUXSDKImaListener.xcworkspace -scheme MUXSDKImaListener-Example -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO | xcpretty
- pod lib lint
Когда travis пытается построить эти тесты, он сталкивается с ошибкой при установке Cocoapods.Этот вывод немного сбивает с толку, потому что кажется, что он требует Mux-Stats-AVPlayer 1.0.1, но затем он остается, он не может найти эту версию.
Эта версия существует: https://cocoapods.org/pods/Mux-Stats-AVPlayer
$ bundle --version
Bundler version 2.0.2
announce
$ xcodebuild -version -sdk
$ pod --version
1.7.5
before_install.1
2.77s$ gem install cocoapods
2.76s$ pod install --repo-update --project-directory=Example
Updating local specs repositories
Adding spec repo `trunk` with CDN `https://cdn.cocoapods.org/`
Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "Mux-Stats-AVPlayer":
In snapshot (Podfile.lock):
Mux-Stats-AVPlayer (= 1.0.1, ~> 1.0.1)
In Podfile:
Mux-Stats-Google-IMA (from `../`) was resolved to 0.3.0, which depends on
Mux-Stats-AVPlayer (~> 1.0.1)
None of your spec sources contain a spec satisfying the dependencies: `Mux-Stats-AVPlayer (= 1.0.1, ~> 1.0.1), Mux-Stats-AVPlayer (~> 1.0.1)`.
You have either:
* mistyped the name or version.
* not added the source repo that hosts the Podspec to your Podfile.
[!] Automatically assigning platform `iOS` with version `9.3` on target `MUXSDKImaListener_Tests` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.
The command "pod install --repo-update --project-directory=Example" failed and exited with 31 during .
Your build has been stopped.
Полная сборка находится здесь:
https://travis -ci.org / muxinc / mux-stats-google-ima / builds / 588638291
Кажется, что я упускаю что-то очевидное в этом конфигурационном файле .travis.yml.
Podfile для примера проекта
use_frameworks!
target 'MUXSDKImaListener_Tests' do
pod 'Mux-Stats-Google-IMA', :path => '../'
pod 'Specta'
pod 'Expecta'
end
Podfile.lock для примера проекта
PODS:
- Expecta (1.0.6)
- GoogleAds-IMA-iOS-SDK (3.10.1)
- Mux-Stats-AVPlayer (1.0.1):
- Mux-Stats-Core (~> 2.0.0)
- Mux-Stats-Core (2.0.12)
- Mux-Stats-Google-IMA (0.3.0):
- GoogleAds-IMA-iOS-SDK (~> 3.9)
- Mux-Stats-AVPlayer (~> 1.0.1)
- Specta (1.0.7)
DEPENDENCIES:
- Expecta
- Mux-Stats-Google-IMA (from `../`)
- Specta
SPEC REPOS:
https://github.com/cocoapods/specs.git:
- Expecta
- GoogleAds-IMA-iOS-SDK
- Mux-Stats-AVPlayer
- Mux-Stats-Core
- Specta
EXTERNAL SOURCES:
Mux-Stats-Google-IMA:
:path: "../"
SPEC CHECKSUMS:
Expecta: 3b6bd90a64b9a1dcb0b70aa0e10a7f8f631667d5
GoogleAds-IMA-iOS-SDK: 0e37ab83b22075ad631a70dcba9528cb246c92bf
Mux-Stats-AVPlayer: e8ab70f9e67ac54958ac6ee87f479e3c0486baf5
Mux-Stats-Core: 73e692799571459722526ff4a721b6872da5c776
Mux-Stats-Google-IMA: 6ef4042dc3a1052ed55edfcc35a55b8106d2a4a3
Specta: 3e1bd89c3517421982dc4d1c992503e48bd5fe66
PODFILE CHECKSUM: 95e48c48a4efb20f1822c750f01f9c105d46475a
COCOAPODS: 1.7.5
Файл Mux-Stats-Google-IMA.podspec для модуля:
#
# Be sure to run `pod lib lint MUXSDKImaListener.podspec' to ensure this is a
# valid spec before submitting.
#
# Any lines starting with a # are optional, but their use is encouraged
# To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html
#
Pod::Spec.new do |s|
s.name = 'Mux-Stats-Google-IMA'
s.version = '0.3.0'
s.summary = 'Mux-Stats-Google-IMA is for tracking performance analytics and QoS monitoring for video with mux.com.'
s.description = <<-DESC
The Mux Stats Google IMA is designed to be used with Mux-Stats-AVPlayer and GoogleAds-IMA-iOS-SDK to track performance analytics and QoS monitoring for video.
DESC
s.homepage = 'https://mux.com'
s.social_media_url = 'https://twitter.com/muxhq'
s.license = { :type => 'Apache 2.0', :file => 'LICENSE' }
s.author = { 'Mux' => 'ios-sdk@mux.com' }
s.source = { :git => 'https://github.com/muxinc/mux-sdk-ima-listener.git', :tag => "v#{s.version}" }
s.ios.deployment_target = '9.0'
s.source_files = 'MUXSDKImaListener/Classes/**/*'
s.dependency 'Mux-Stats-AVPlayer', '~> 1.0.1'
s.dependency 'GoogleAds-IMA-iOS-SDK', '~> 3.9'
end