如何编辑 podspec 文件?编辑:找不到命令

How to edit podspec file? edit: command not found

我已经将一个 forked dead Framework 更新为 Swift 3.

现在我想创建一个 pod,我已经尝试按照指南进行操作。

$ pod spec create Peanut
$ edit Peanut.podspec
$ pod spec lint Peanut.podspec

链接到旧 git 的 .podspec 文件已存在。

我正在使用 cd 导航到正确的路径并且 ls 列出了正确的 .podspec 文件。

但是当我输入 edit NAME.podspec 时,我收到:

-bash: edit: command not found

我试图删除旧文件并输入了那些确切的行。同样的错误。

pod spec create Peanut
edit Peanut.podspec
pod spec lint Peanut.podspec

我错过了什么?

此问题与CocoaPods无关。错误是找不到命令 edit.

您可以尝试 nano Peanut.podspecvi Peanut.podspecopen -e Peanut.podspecopen -t Peanut.podspec