21

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.

enter image description here

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 Answers5

47

Open the Podfile with TextEdit use terminal

 $ cd "your_project_location"
 $ open -a TextEdit Podfile
Ahmed Abdallah
  • 2,338
  • 1
  • 19
  • 30
  • thanks its help (-: – Roei Nadam Nov 07 '16 at 11:55
  • 2
    Isn'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
  • 2
    It 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
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
0

Drag and drop it to TextEdit or open project in XCode and edit there.

Igor
  • 12,165
  • 4
  • 57
  • 73