开发者

Xcode -- keeping things organized when I have multiple targets

This very helpful answer explains how to include different files in differe开发者_Python百科nt targets in an Xcode project.

My question is more of a philosophical one -- what conventions can I used to keep things organized?

Situations I am likely to encounter include the following:

  • Different versions of a class for different targets
  • Desire for different header files for said different versions of a class
  • Whole portions of my project that apply to some targets but not others

I want to manage the whole thing with a minimum of fuss.


It sounds like multiple projects is the way to go, particularly where you have lots of files that are only relevant to one or two targets. It also means that you can have just one version of a class per project, only building targets that use this version. Xcode can still understand dependent targets when they're in different projects, just import the project with the dependency into the main project.


I posted a tutorial to explain keeping things organized when you have multiple targets.

Follow it.

http://www.madnikblog.com/blog/2013/09/19/organize-xcode-project-with-multiple-targets/

Simple idea is.

All the logic lives in a static library which is indeed dependency target of each executable targets. All the Resources stay in a bundle which also a dependency again.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜