Link one framework to multiple subprojects in Xcode workspace

I have a workspace that contains multiple projects - Project A and Project B. In this case, Project B is a dependency on project A. When project A is built, project B is then added as a dynamic structure for Project A.

- Project A - Framework 1 - Project B - Framework 1

Both Project A and Project B rely on the framework (Framework 1). I add this structure to both projects by going Build Settings -> Framework Search Paths -> Add path to Framework 1

. When I compile the project, I get Xcode warnings saying:

Class XXX is implemented in both PATH 1 and PATH 2. One of the two will be used. Which one is undefined.

What I really want to say is that Xcode links the Framework to both subprojects, but for the understanding that this is one shared library that doesn't need to be duplicated. I have two questions:

  • Is it possible?
  • If this is not possible, will this warning cause problems? For example, is it that Xcode will only use source code from the Framework location, or is it that Xcode can run parallel instances of the framework code, which can cause duplicate single element issues.
+3


source to share





All Articles