Xcode workspaces with sub-projects and project dependencies triggering builds

前端 未结 6 424
轻奢々
轻奢々 2021-01-31 08:18

I wish there was better documentation for this for Xcode 5 but I couldn\'t find anything decent describing best practices for working with workspaces, so..

In a workspac

6条回答
  •  死守一世寂寞
    2021-01-31 08:45

    This solution was intended for another problem, but maybe it fills your needs.

    After adding your subproject to the workspace:

    1. Select the Target which should use the newly added subproject
    2. In "Link Binaries with Libraries" under Build Phases hit the + button
    3. If the Library does´t show up hit "Add Other..."
    4. Navigate to the Folder where the project file (*.xcodeproj) lies
    5. Mark it and hit "Open"
    6. Now you should see the Project File show up under "Link Binaries with Libraries"
    7. Under "Target Dependencies" in the same tab, hit the + button
    8. Now you should see the necessary files
    9. Check yours and hit "Add"
    10. Again in the "Link Binaries with Libraries" hit the + button
    11. Now your .a file should show up and you can choose and add it

    Now you are using the chosen library for your target. Repeat those steps for every target which needs this subproject. Hope that helps! For me it did because i could not manage to add dependencies to it before...

    Greetz, Tomte

提交回复
热议问题