Reputation: 798
I can’t push a new version of my pod to the CocoaPods specs repository.
Running pod trunk push MyPod.podspec
results in the following error:
[!] The Pod Specification did not pass validation.
The following validation failed:
- Warnings: Unrecognized `swift_version` key.
Here’s my podspec:
Pod::Spec.new do |spec|
spec.name = "MyPod"
spec.version = "0.1.1"
spec.summary = "[REDACTED]"
spec.homepage = "[REDACTED]"
spec.license = "Apache License, version 2"
spec.author = "[REDACTED]"
spec.social_media_url = "[REDACTED]"
spec.module_name = "MyPod"
spec.swift_version = "5.0"
spec.platform = :ios, "8.0"
spec.source = { :git => "https://github.com/[REDACTED].git", :tag => "v#{spec.version}" }
spec.source_files = "MyPod/**/*.{h,m,swift}"
end
What am I doing wrong?
I first noticed these errors before updating to Swift 5 and Xcode 10.2.
Upvotes: 3
Views: 642
Reputation: 798
It seems to be a server-side bug. It’s been reported on GitHub.
However, since it’s a warning, not an error (despite it’s in red font color, which is confusing), it can be ignored with the --allow-warnings
argument.
Upvotes: 12
Reputation: 255
Summary, to update a pod:
Update the version and the tag in podspec beforehand Commit, push code to git Create new tag with the current code, make sure it's the same tag as the one in podspec
git tag 0.1.1
git push origin 0.1.1 Call pod spec lint to check and pod trunk push to update it on repo master list
pod lib lint YourSDK.podspec
pod trunk push YourSDK.podspec It appears that your podfile is using the tag v0.1.1, however the tag in your repository is 0.1.1 without the v. This would also cause linting to fail.
Upvotes: 0