简体   繁体   English

将文件添加到Xcode项目

[英]Adding Files to Xcode project

Trying to add file to the project! 试图将文件添加到项目中!

Right click on the subfolder and selected add file to projectName. 右键单击子文件夹,然后选择将文件添加到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! 我在项目中添加了所需的文件[Destination unChecked和selected folders为任何添加的文件夹创建组并选择Add to Targerts projectNameTest],然后关闭xcode并重新打开! 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. 然后再右键单击所选项目从'workspace'添加文件并添加到项目[重复相同的场景]并关闭xcode静态文件正从我的工作区中消失。

each time i need to add the file again and again from the work space. 每次我需要从工作区一次又一次地添加文件。 When I close the Xcode. 当我关闭Xcode时。 what i need to do for this issue so When i Open Xcode the files need to be appears into my workspace 我需要为这个问题做什么所以当我打开Xcode时,文件需要出现在我的工作区中

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. 这有帮助。

If you want to add files with a CLI, as I do, since I use a remote mac for development, you can check XCodeControl at github. 如果您想像我一样使用CLI添加文件,因为我使用远程mac进行开发,您可以在github上检查XCodeControl This method is much faster than licking somewhere, at least if you hung over ;) 这个方法比舔某个地方快得多,至少如果你挂了;)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM