David Seek David Seek - 1 month ago 15
Swift Question

CocoaPods / How to edit podspec file

I have updated a forked dead Framework to Swift 3.

Now I want to create a pod and I've tried to follow the Guides.

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


A
.podspec
file, linking to the old git, is existing.

I'm navigating to the correct path using
cd
and
ls
lists the correct
.podspec
file.

But when I enter
edit NAME.podspec
I receive:


-bash: edit: command not found


I have tried to delete the old file and entered those exact lines. Same error.

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


Version:

gem which cocoapods
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods.rb


What am I missing? Help is very appreciated.

Answer

This question has nothing to do with CocoaPods. The error is that you can't find the command edit.

You could try nano Peanut.podspec or vi Peanut.podspec or open -e Peanut.podspec or open -t Peanut.podspec.

Comments