Can Xcode Use “Folder References” for Code?

前端 未结 4 918
不知归路
不知归路 2021-02-06 22:14

Like many people, I would love to have Xcode use a folder structure that mirrors the folder-structure on disk. However, I cannot get the code in \"folder references\" (the cyan

4条回答
  •  梦谈多话
    2021-02-06 22:44

    I just tried doing this to share code across multiple Xcode projects, and our team came to the conclusion that it's better to create an Xcode project that contains all of your shared classes, compiles them into a static/dynamic library, and then add that as a subproject to those that need the shared code. Then you can set up target dependencies and link your shared library. This will get you the "automatic updating" every time you add a new class to the shared library project.

    This approach also works well with submodules or even cocoapods/carthage.

提交回复
热议问题