如何打开Podfile进行编辑

Ahm*_*lah 13 ios cocoapods

我用CocoaPods我的应用程序,我注意到我无法打开pod file,文件转向exec文件像图像下来,我需要编辑它以添加新的库.

在此输入图像描述

Ahm*_*lah 31

使用TextEdit打开Podfile 使用终端

 $ cd "your_project_location"
 $ open -a TextEdit Podfile
Run Code Online (Sandbox Code Playgroud)

  • 不是知道 textedit 会用不同的字符替换某些字符,例如“和 ' 吗?并因此损坏文件?建议使用 `open -a Xcode Podfile` 来代替 (2认同)
  • 建议使用Xcode编辑Podfile而不是TextEdit,因为引号之类的字符在这两者中完全不同. (2认同)

小智 10

我想你会尝试这些步骤:

1- $ cd您的文件位置

2- $ open -a Xcode Podfile


Yak*_*sky 10

从终端打开文件

vim Podfile

  • @Akshay 使用`:wq` (2认同)

Ami*_*a シ 5

1.从终端打开podfile

$ cd "your_project_location that contain podfile"
$ nano Podfile
Run Code Online (Sandbox Code Playgroud)

2.你也可以使用xcode打开podfile

右键单击 podfile 并选择 openwith xcode。