I am attempting to setup an installation using Cocoapods for my iOS Xcode project.
cocoapods.org
When I get to the point where I need to edit my Podfile, it doesn't work. I attempt to execute the command edit Podfile in the correct directory, but I get:
-bash: edit: command not found
I'm not exactly sure what to do and performing that line is pretty vital to getting cocoapods working correctly.
I have tried restarting terminal and my computer as well with no luck.
Bit of a strange one from the Cocoapods documentation there, as there is no edit
command built into OS X as far as I'm aware. They probably just intend that example to mean 'edit with your favourite text editor', or it could be that they're using TextWrangler's commandline tool (see below). Here are some alternatives you could try, however...
open -a TextEdit Podfile
This will open up your Podfile
with TextEdit. Replace 'TextEdit' with the name of some other app if you prefer.
Both of the popular text editors SublimeText and TextWrangler have the option of installing command-line executables.
TextWrangler asks you on first launch whether you want to install them, and will then do it automatically. For Sublime Text you need to run the following command:
ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" ~/bin/subl
(You may need to change the path to the application in there depending on whether you have ST 2 or 3 installed)
Depending on which editor you use, you'll have two possible commands you can use:
subl Podfile
- open your Podfile with SublimeTextedit Podfile
- open your Podfile with TextWranglerFinally, for the more advanced user, you could use a terminal-based editor, such as Vim or Nano. Nano is easier to get started with, and is fine for small edits like this. Just run nano Podfile
from the Terminal.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With