Reputation: 91
I am in the process of creating a pod. I am getting this error while linting : pod spec lint TrackerExample.podspec --no-clean --use-libraries
I am 1 error away from pod validation. Can you please help figuring out what is missing or what requires revision.
this is my podspec:
Pod::Spec.new do |spec|
spec.name = "TrackerExample"
spec.version = "0.0.1"
spec.license = "Copyright ****"
spec.homepage = "https:// *****"
spec.author = { "*****" => "*******" }
spec.summary = "some description"
spec.source = { :git => "******t" }
spec.source_files = "TrackerExample/*.{h,m}"
spec.ios.deployment_target = "9.0"
spec.osx.deployment_target = "10.10"
spec.swift_version = '4.0'
spec.dependency 'MatomoTracker', '5.2'
spec.subspec 'MatomoTracker' do |lib|
lib.dependency 'MatomoTracker', '5.2'
lib.source_files = "Pods/MatomoTracker/MatomoTracker/*.{h,m,swift}"
end
end
and, this is the terminal output. I am getting the following error:
ERROR | [OSX] unknown: Encountered an unknown error (CocoaPods could not find compatible versions for pod "MatomoTracker":
-> TrackerExample (0.0.1)
- WARN | source: Git sources should specify a tag.
- WARN | [iOS] license: Unable to find a license file
- WARN | xcodebuild: MatomoTracker/MatomoTracker/EventSerializer.swift:15:19: warning: 'flatMap' is deprecated: Please use compactMap(_:) for the case where closure returns an optional value
- NOTE | xcodebuild: MatomoTracker/MatomoTracker/EventSerializer.swift:15:19: note: use 'compactMap(_:)' instead
- WARN | xcodebuild: TrackerExample/Pods/MatomoTracker/MatomoTracker/EventSerializer.swift:15:19: warning: 'flatMap' is deprecated: Please use compactMap(_:) for the case where closure returns an optional value
- NOTE | xcodebuild: TrackerExample/Pods/MatomoTracker/MatomoTracker/EventSerializer.swift:15:19: note: use 'compactMap(_:)' instead
- ERROR | [OSX] unknown: Encountered an unknown error (CocoaPods could not find compatible versions for pod "MatomoTracker":
In Podfile:
TrackerExample (from `/Users/s.ludosky/Documents/projects/ios/libs/TrackerExample/TrackerExample.podspec`) was resolved to 0.0.1, which depends on
MatomoTracker (= 5.2)
Specs satisfying the `MatomoTracker (= 5.2)` dependency were found, but they required a higher minimum deployment target.) during validation.
Pods workspace available at `/var/folders/n8/9jmhgp1x2hxgg7_r4ryvs7tcn166k1/T/CocoaPods-Lint-20180821-86279-qyai9s-TrackerExample/App.xcworkspace` for inspection.
Analyzed 1 podspec.
[!] The spec did not pass validation, due to 1 error and 4 warnings.
something related to the podfile. I did specify the pod version as 5.2 though. Why is this conflicting with the version 0.0.1 of my own pod ?
fyi, this the podfile for the 'MatomoTracker' dependency I am using
# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'
target 'TrackerExample' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for TrackerExample
pod 'MatomoTracker', '~> 5.2'
end
Upvotes: 1
Views: 1287
Reputation: 438
If you create a file called .swift-version with the version you need (e.g. "4.0"), in the same directory where you run pod spec lint echo "4.0" > .swift-version
It may solve your problem.
Also just do the below steps:-
Upvotes: 1