简体   繁体   English

2个工作区中的2个项目xcode(代码共享)

[英]2 Projects in the same workspace xcode (code share)

I am currently working on a workspace with 2 projects. 我目前正在2个项目的工作区中。 One project does not depend on the other. 一个项目不依赖于另一个。 They are separate entities. 它们是独立的实体。

However a previous developer has implemented new features on the one project and I now need to implement the same features on the other project. 但是,以前的开发人员已经在一个项目上实现了新功能,而我现在需要在另一个项目上实现相同的功能。

However the classes that he has implemented in the one project import other classes. 但是,他在一个项目中实现的类将导入其他类。 These classes are not currently in the project I am working on. 这些类目前不在我正在研究的项目中。

What is the best way to share these classes across the 2 projects. 在两个项目中共享这些类的最佳方法是什么。 I don't really want to copy the files over because that would making supporting the 2 projects harder. 我真的不想复制文件,因为那样会使支持2个项目的工作变得更加困难。 Ie - We would have to update both projects at the same time and is much more prone to a mistake. 即-我们将必须同时更新两个项目,并且更容易出错。

Also when you do copy files from one project to the other (clicking copy) I am having a lot of issues with my project conflicting with the other project. 同样,当您确实将文件从一个项目复制到另一个项目(单击复制)时,我的项目与另一个项目发生冲突时也会遇到很多问题。 Here is a question I asked about this issue: Xcode: Copy files from one Project to another in same workspace 这是我问这个问题的问题: Xcode:将文件从一个项目复制到同一工作区中的另一个项目

Is there an elegant way to share these files across the two projects? 是否有一种优雅的方式在两个项目之间共享这些文件?

Thanks in advance. 提前致谢。

如果您使用Git,请看一下子模块

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

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