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

时间:2023-01-17 17:14:53

I am currently working on a workspace with 2 projects. One project does not depend on the other. They are separate entities.

我目前正在开发一个包含2个项目的工作区。一个项目不依赖于另一个项目。它们是独立的实体。

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. I.e - We would have to update both projects at the same time and is much more prone to a mistake.

在两个项目中分享这些课程的最佳方式是什么。我真的不想复制文件,因为这会使得支持2个项目更加困难。即 - 我们必须同时更新这两个项目,更容易出错。

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:将文件从一个Project复制到另一个Project中

Is there an elegant way to share these files across the two projects?

是否有一种优雅的方式在两个项目*享这些文件?

Thanks in advance.

提前致谢。

1 个解决方案

#1


If you work with Git, take a look on submodule

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

#1


If you work with Git, take a look on submodule

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