rwpickflavor.podspec规范未验证
我通过遵循本教程来学习: https://www.raywenderlich.com/5823-操作方法创作-A-cocoapod-in-swift
我被困在它说的地方: 使用您的新可可录
在我写的终端中
cd ~/Documents/Libraries/RWPickFlavor
pod repo add RWPodSpecs https://github.com/user/RWPodSpecs.git
pod repo push RWPodSpecs RWPickFlavor.podspec
:但是我会遇到很多错误:
[!] /usr/bin/git clone https://github.com/user/RWPodSpecs.git -- RWPodSpecs
fatal: destination path 'RWPodSpecs' already exists and is not an empty directory
而且:
Validating spec
-> RWPickFlavor (0.1.0)
- NOTE | url: The URL (https://github.com/user/RWPickFlavor) is not reachable.
- ERROR | [iOS] unknown: Encountered an unknown error ([!] /usr/bin/git clone https://github.com/user/RWPickFlavor.git /var/folders/bw/h527d_4x6yb7rv3tdrldty1c0000gn/T/d20220525-6530-de485a --template= --single-branch --depth 1 --branch 0.1.0
Cloning into '/var/folders/bw/h527d_4x6yb7rv3tdrldty1c0000gn/T/d20220525-6530-de485a'...
warning: Could not find remote branch 0.1.0 to clone.
fatal: Remote branch 0.1.0 not found in upstream origin
) during validation.
[!] The `RWPickFlavor.podspec` specification does not validate.
有什么想法吗?
I'm learning by following this tutorial:
https://www.raywenderlich.com/5823-how-to-create-a-cocoapod-in-swift
And I'm stuck in the place where it says:
Using Your New CocoaPod
in the terminal I wrote:
cd ~/Documents/Libraries/RWPickFlavor
pod repo add RWPodSpecs https://github.com/user/RWPodSpecs.git
pod repo push RWPodSpecs RWPickFlavor.podspec
but I get a lot of errors:
[!] /usr/bin/git clone https://github.com/user/RWPodSpecs.git -- RWPodSpecs
fatal: destination path 'RWPodSpecs' already exists and is not an empty directory
and:
Validating spec
-> RWPickFlavor (0.1.0)
- NOTE | url: The URL (https://github.com/user/RWPickFlavor) is not reachable.
- ERROR | [iOS] unknown: Encountered an unknown error ([!] /usr/bin/git clone https://github.com/user/RWPickFlavor.git /var/folders/bw/h527d_4x6yb7rv3tdrldty1c0000gn/T/d20220525-6530-de485a --template= --single-branch --depth 1 --branch 0.1.0
Cloning into '/var/folders/bw/h527d_4x6yb7rv3tdrldty1c0000gn/T/d20220525-6530-de485a'...
warning: Could not find remote branch 0.1.0 to clone.
fatal: Remote branch 0.1.0 not found in upstream origin
) during validation.
[!] The `RWPickFlavor.podspec` specification does not validate.
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我遇到了这个问题,这是我如何解决的:
〜/documents/libraries/rwpickflavor
目录中,然后在执行终端中的任何命令之前。rwpickflavor.podspec
的内容是否正确。我的不是,如果有问题,那么它将无法验证podspec。rm -rf .git
(同样,请确保您在〜/documents/librares/rwpickflavor
)中。这个步骤可能太过分了,但是我认为当推到Github时,我错过了一些东西,而且由于这只是一个初始提交,所以我觉得它真的没有伤害任何事情。是的,我知道这不是关于版本控制的最佳练习。git Init
git add。
git commit -m“初始提交”
git标签0.1.0
git分支-m main
git Remote添加https://github.com/user/rwpickflavor.git
git push -u rigins main -tags
pod repo push rwpodspecs rwpickflavor.podspec
说明:我想我/我们可能已经在此过程中忘记了标签创建,也忘记将其包括在推送中。在删除远程存储库之前,我注意到没有标签,即使我添加了标签,podspec仍然无法验证。
希望这有帮助。
I had this very issue and here is how I resolved it:
~/Documents/Libraries/RWPickFlavor
directory before performing any commands in Terminal.RWPickFlavor.podspec
are correct. Mine was not and, if something is wrong, then it will not validate the Podspec.rm -rf .git
(again, make sure you are in~/Documents/Libraries/RWPickFlavor
). This step might be excessive, but I figured I had missed something when pushing to GitHub and, since this was just an initial commit, I did not feel like it really harmed anything. Yes, I am aware this is not best practice with regards to version control.git init
git add .
git commit -m "Initial commit"
git tag 0.1.0
git branch -M main
git remote add origin https://github.com/user/RWPickFlavor.git
git push -u origin main --tags
pod repo push RWPodSpecs RWPickFlavor.podspec
Explanation: I think I/we might have forgotten the tag creation in the process and also forgot to include it in the push. Before I deleted the remote repo, I noticed that there was no tag and, even if I added a tag, the Podspec still would not validate.
Hope this is helpful.