5

I have two Xcode projects, Test and TestFramework in Xcode. Test is related to TestFramework.

There are 2 configurations in TestFramework, which are DEBUG and RELEASE. But 3 configurations in Test. Two of them are same with the configurations in TestFramework. The other one is DEBUG_FOR_TEST.

Test Configuration List:

  1. DEBUG
  2. RELEASE
  3. DEBUG_FOR_TEST

TestFramework Configuration List:

  1. DEBUG
  2. RELEASE

Now When I build Test in DEBUG_FOR_TEST, it will fall into trap by missing TestFramework.

Since there is no DEBUG_FOR_TEST configuration in TestFramework, RELEASE will be used to build. And Test could not find TestFramework in the directory of DEBUG_FOR_TEST. Then it comes to that error.

I try to find the solution. There are several way to solve it:

  1. Add DEBUG_FOR_TEST configuration for TestFramework. It acts but I don't want to change the Build Setting in TestFramework. Because it could be a 3rd party framework sometimes. It could be a hard work under the source control.

  2. Add the path of TestFramework's RELEASE framework into the Framework Search Path of Test. It also acts but I may want DEBUG_FOR_TEST to be related to DEBUG.

So, both of them can not solve this perfectly.

I think if I can specific the configuration while it's propagated through different project, it should be done.

I do find a way in this website by adding SUBPROJECT_CONFIG and running a script. It also acts but very redundant.

I think it's a common problem. Most of the article about this question is written many years before. Apple might provide a common way to solve it now. But I can't find this. Does anyone have ideas?

Ringo_D
  • 784
  • 5
  • 18

0 Answers0