Building Targets in the Correct Order
Ensure that targets are built in the proper order using target dependencies. In a complex project, you may have several targets that need to be built in a specific order to create related products.
In the project editor, select the target to which you want to add a dependency.
Click Build Phases at the top of the project editor.
Open the Target Dependencies section.
Click the Add button (+) to add a target dependency.
Select a target from the list and click Add.
For example, a project for a client-server software package may contain targets that create a client application, a server application, tools that provide command-line interfaces to the client and server, and a private framework that all the other targets use. For the project to build correctly, the private framework needs to be built before the other targets—that is, the other targets have a dependency on the private framework.