Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

ios

xcode4

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

like image 595
bodacious Avatar asked Feb 02 '26 06:02

bodacious


1 Answers

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.

like image 55
mattjgalloway Avatar answered Feb 03 '26 19:02

mattjgalloway



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!