Xcode 应用程序项目目录的根目录在哪里?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/33595027/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 08:10:55  来源:igfitidea点击:

where is the root of the Xcode app project directory located?

xcode

提问by Frederic

I'm following a app tutorial and it says:

我正在关注一个应用程序教程,它说:

"Next, create an empty file in the root of the Xcode app project directory and call the file Podfile. Open it with your favorite text editor and paste the following line in it:"

“接下来,在 Xcode 应用程序项目目录的根目录创建一个空文件,并调用该文件 Podfile。用你喜欢的文本编辑器打开它,并在其中粘贴以下行:”

I'm confused exactly where this is? is it inside my Xcode program? or is it some folder inside my Xcode folder in finder?

我很困惑,这到底是哪里?它在我的 Xcode 程序中吗?还是我的 Xcode 文件夹中的某个文件夹在 finder 中?

采纳答案by Lukesivi

Got it.

知道了。

Open Terminal, navigate to the directory that has your project. Type it like this:

打开终端,导航到您的项目所在的目录。像这样输入:

cd ~/Path/To/Folder/Containing/yourProject

cd ~/Path/To/Folder/Containing/yourProject

I saved mine on my desktop so it was simple.

我把我的保存在我的桌面上,所以很简单。

Then type: pod init

然后输入: pod init

This creates the pod file.

这将创建 pod 文件。

Then type:

然后输入:

open -a Xcode Podfile

open -a Xcode Podfile

This will open the file so that you can edit it.

这将打开文件,以便您可以对其进行编辑。

回答by carlson

You should do it in Terminal. Once in Terminal:

您应该在终端中执行此操作。一旦进入终端:

  1. type cd(there is a space after cd)

  2. drag your project to the Terminal window and press return. It points Terminal to your project.

  3. type touch .Podfile, which will create an empty file in your project

  4. type open -a TextEdit .Podfile, which will open the .Podfile file in TextEdit

  5. paste your code in it and then save.

  6. you can check that your Podfile has been created by typing ls -ain Terminal, which will show you all files and folders in your project

  1. 类型cd(cd后有一个空格)

  2. 将您的项目拖到终端窗口并按回车键。它将终端指向您的项目。

  3. type touch .Podfile,这将在您的项目中创建一个空文件

  4. type open -a TextEdit .Podfile,这将在 TextEdit 中打开 .Podfile 文件

  5. 将您的代码粘贴到其中,然后保存。

  6. 您可以通过ls -a在终端中键入来检查您的 Podfile 是否已创建,这将显示您项目中的所有文件和文件夹

This should work.

这应该有效。