Search code examples
iosxcode4

Are there any standard practices for organising files within an iOS xCode project?


I'm coming to iOS development from a web dev background.

Having all of my view controllers, data models and storyboards in the same directory is a real mess.

Are there any conventions for organising files within a project?

If not, are there any good reasons why I shouldn't do so like:

my_project/
  view_controllers/
  data_models/
  views/
  assets/
  tests/

All advice appreciated


Solution

  • There's no conventions (that I know of at least), it just comes down to what you feel move comfortable with. I use a similar kind of structure to you though along these lines:

    MyProject/
      Source/
        Controller/
        Model/
        View/
        External/
          JoeRandomLibrary/
      Resources/
        Graphics/
        Interfaces/
    

    I find that lays things out quite nicely. I then replicate that structure to that on disk as well.