Search code examples
iphoneiosxcodeipadworkspace

How to organise my projects, libraries, etc more efficiently in XCode 4.3?


I am currently writing a iOS app.

The app has its own main project.

This app also involves several components and I decide to write those components as static library so that they are more independent and I can more easily share them on GitHub.

And then the main project and library projects all use several 3rd party libraries (they are all source file based. Normally I just need to copy the source files into my project and include the head and use it).

Also I wish to create a non-development project, which contains some journals, dev notes, some candidate images I may use for the app, etc.

So, how should I organise and create all projects including 3rd party libraries in Xcode workspace?

I presume

  1. of course, I need to create a project for my main app.
  2. One project for each of my own libraries?
  3. Where should I put the 3rd party libraries? Since all my own libraries and the main app project may use them, I can't just add those 3rd party libraries into one of my own project. The structure won't be clear if I do that, right?
  4. Another empty project for all my notes, images, etc?

Thanks


Solution

  • I tend to do the following:

    1. Yeah, create a project. If you're using git, have Xcode create the repo.
    2. I would do a different project per library, but I don't usually make libraries.
    3. I use Cocoapods to manage 3rd-party code. It's great.
    4. I typically include all related files in a specific folder in the top-level of the repo, away from all the code.