I used CocoaPods
with my app I noticed I can't open pod file
and the file turn to exec
file like the image down, I need to edit it to add new libraries.
Asked
Active
Viewed 5.0k times
21

Ahmed Abdallah
- 2,338
- 1
- 19
- 30
-
use `nano` from terminal, or just drag and drop inside `text editor` like `sublime` – jose920405 Jul 11 '16 at 12:41
-
Right click on that and choose Open With option in that you can open your Podfile in TextEditor or TextWrangler. – Darshan Mothreja Jul 11 '16 at 13:43
-
If you have the CocoaPods app installed: `open Podfile -a CocoaPods` from the Podfile directory in Terminal will open the Podfile for editing in the app. I'm not sure why this question was locked for being too broad. It is not too broad if the question asker has no idea where to start, which is a valid position to be in. – Nathan Hosselton Apr 02 '18 at 17:56
5 Answers
47
Open the Podfile with TextEdit use terminal
$ cd "your_project_location"
$ open -a TextEdit Podfile

Ahmed Abdallah
- 2,338
- 1
- 19
- 30
-
-
2Isn't textedit known to replace certain characters like " and ' with different ones? And corrupting the file because of this? Would recommend `open -a Xcode Podfile` instead – jorrebor Sep 06 '17 at 08:51
-
2It is recommended to use Xcode for editing Podfile rather than TextEdit since characters such as quotes are completely different in these two. – Jayprakash Dubey Nov 23 '17 at 10:58
-
I have a project in swift 2.3 version which has podfile in exec format.I want to upgrade it to swift 3.0 including podfiles.What are the steps I want to follow? – Raghuram Dec 11 '17 at 11:49
13
Open file from Terminal
vim Podfile

Yakiv Kovalskyi
- 1,737
- 1
- 15
- 29
-
how do u save it ??I use :q! to come out but it says didn't find any podfile – Akshay Jul 12 '17 at 10:52
-
2
-
-
You can also use "vi
" or "sudo vi – Gurjinder Singh Sep 12 '18 at 16:17" for system config files. After pressing enter the file will open and press i to enter into insert mode only then you will able to edit the file after editing press Escape key then use :wq to save and exit.
12
I think you will try these steps :
1- $ cd Your file location
2- $ open -a Xcode Podfile

Abd Aboudi
- 331
- 2
- 7
5
1.open podfile from terminal
$ cd "your_project_location that contain podfile"
$ nano Podfile
2.You can also open podfile using xcode
Right click to podfile and choose openwith xcode.

Amit Jagesha シ
- 1,092
- 12
- 21