How should I manage dependencies across projects in an Xcode workspace?

后端 未结 7 813
心在旅途
心在旅途 2020-11-28 18:48

I\'m working on an iOS app project, and add the json-framework project to the workspace. The project navigator on the left shows both projects, and the build scheme selector

7条回答
  •  孤街浪徒
    2020-11-28 19:24

    I’ve just set a test project up, pretty much as you describe in version 3, by creating a new workspace and dragging the two Xcode project into it, nested as shown.

    You can delete the sibling project if you have it already.

    Hitting build on this and it just works, as far as I can see.

    Scheme Settings Project Layout

    I imagine there is internal path-confusion if you have two projects, and I’d be inclined to fiddle with location settings in "View"->"Utilities"->"File Inspector" and see what effect that has.

    enter image description here enter image description here

    Another thing to try is to set your paths up in Xcode "Preferences…"->"Source Trees" and refer to them that way, as described here: Easy, Modular Code Sharing Across iPhone Apps: Static Libraries and Cross-Project References

    HTH. Andy W.

提交回复
热议问题