简体   繁体   English

创建新的Xcode工作区项目

[英]Create the New Xcode Workspace Project

我如何将一个xcode项目添加到已经存在的xcode项目中?我想使用子xcode项目文件到父xcode项目中,请给我解决方案。

If you just want to use some files and not the whole project, you can drag in the desired files and make sure not to check 'copy files', so that a reference is dragged into your new project. 如果只想使用某些文件而不是整个项目,则可以拖入所需的文件,并确保不要选中“复制文件”,以便将引用拖到新项目中。

If you want to import an entire project, start by dragging it in to your current project. 如果要导入整个项目,请先将其拖到当前项目中。 Then click on the current project icon in the top left corner of the IDE, after you have selected the project in the top middle portion of the screen you will see a list of General Capabilities Info etc. select Build Settings. 然后,单击IDE左上角的当前项目图标,在屏幕的中上部分选择项目后,您将看到“常规功能信息”列表,然后选择“ Build Settings”。

Search for 'Header Search Paths' and include a path to the project you are importing. 搜索“标题搜索路径”,并包括要导入的项目的路径。 For example if your current project is in /Repos/MyFirstProject/myproj.xcodeProj and your other project is in /Repos/MySecondProject/myotherproj.xcodeproj then the search path would be ../MySecondProject and make it recursive. 例如,如果您当前的项目在/Repos/MyFirstProject/myproj.xcodeProj中,而其他项目在/Repos/MySecondProject/myotherproj.xcodeproj中,则搜索路径将是../MySecondProject并使其递归。 Next search for Linker Flags and inside Other Linker Flags add -all_load -ObjC 接下来搜索链接器标志,并在其他链接器标志内添加-all_load -ObjC

This can be tricky and you may need to take some additional steps if you are working with libraries. 这可能很棘手,如果您正在使用库,则可能需要采取一些其他步骤。

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

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