0

due to working needs, I need to integrate an xcodeproj into my existing project as subproject.

The structure of my two projects is the following

Structure of the two projects

What is the best practice to integrate (no cocoapods) the subProject into my main project?

I have done the following steps as you can see from the picture below:

Integration Steps

  1. I have copied the folder and all the files to my MainProject folder.
  2. In XCode I have added files to MainProject and then I have choose the "SubProject.xcodeproj" and I can see the structure in the project navigator.
  3. I have added into the "Search Header Path" the following sentence: "${SRCROOT}/../SubProject" with recursive search.

I am not be able to import into my main project the header of the sub project. How can I solve my situation? What I am missing?

  • It is not clear what you mean for integration. Which kind of projects are? A simple integration is just to drag the .xcodeproj file of the secondari project into the project navigator of your main project – Antonio Romano Oct 13 '15 at 12:22

1 Answers1

0

Is not clear what you mean with "Integrate a sub project". What to you want achieve? A single target or every project should build a different binary?

First of all I would suggest you to put both project in the same folder, in your example they are both inside the Desktop folder so this is ok.

As second step you should create a workspace, and add both project to this workspace. There is no need of moving folders around, just drag the project icon inside xCode, just below the workspace icon.

IgnazioC
  • 4,554
  • 4
  • 33
  • 46