Building Targets in the Correct Order

    Steps
  1. In the project editor, select the target to which you want to add a dependency.

  2. Click Build Phases at the top of the project editor.

  3. Open the Target Dependencies section.

  4. Click the Add (+) button to add a target dependency.

  5. Select a target from the list and click Add.



image: ../Art/BuildingTargetsintheCorrectOrder_button.png

Ensure that targets are built in the proper order using target dependencies. In a complex project, you may have several targets that create related products. Frequently, these targets need to be built in a specific order.

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.

The video illustrates adding a private framework to the client application target’s dependency list.