将文件添加到 Xcode 项目
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/15189913/
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
Adding Files to Xcode project
提问by Kiran
Trying to add file to the project!
尝试将文件添加到项目中!
Right click on the subfolder and selected add file to projectName. I added file which are required into my project[Destination unChecked and selected folders Create groups for any added folders and selected Add to Targerts projectNameTest], and close the xcode and reopen! the file which are added to the project is not appear's. Then again right clicked on the project selected add file's from 'workspace' and add to project [repeated same scenario] And close the xcode still files are disappearing from my workspace.
右键单击子文件夹并选择将文件添加到 projectName。我在我的项目中添加了所需的文件[目标未选中和选定的文件夹为任何添加的文件夹创建组并选择添加到目标项目名称测试],然后关闭 xcode 并重新打开!添加到项目中的文件没有出现。然后再次右键单击选择的项目,从“工作区”添加文件并添加到项目 [重复相同的场景] 并关闭 xcode 仍然文件从我的工作区消失。
each time i need to add the file again and again from the work space. When I close the Xcode. what i need to do for this issue so When i Open Xcode the files need to be appears into my workspace
每次我需要从工作空间一次又一次地添加文件时。当我关闭 Xcode 时。我需要为这个问题做些什么,所以当我打开 Xcode 时,文件需要出现在我的工作区中
回答by swiftBoy
What i do generally when I need to add extra source files to my project is :
当我需要向我的项目添加额外的源文件时,我通常会做的是:
1. Drag the file from source to my project.
1. 将文件从源拖到我的项目中。
2. I add Tick mark to the "Copy items into destination group's folder (if needed)" option.
2. 我将勾选标记添加到“将项目复制到目标组的文件夹(如果需要)”选项中。
3. Now i can seed added file into my project.
3. 现在我可以将添加的文件种子到我的项目中。
Hope!! this helps.
希望!!这有帮助。
回答by ikrabbe
If you want to add files with a CLI, as I do, since I use a remote mac for development, you can check XCodeControlat github. This method is much faster than licking somewhere, at least if you hung over ;)
如果你想像我一样使用 CLI 添加文件,因为我使用远程 mac 进行开发,你可以在 github 上查看XCodeControl。这种方法比舔某个地方要快得多,至少如果你挂了的话;)