Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I've been developing an app for the iOS platform, and as I've been going along, I've noticed that I've done a terrible job of keeping my files (.h, .m, .mm) organized. Is there any industry standards or best practices when it comes to organizing files for an iOS project?

My files include custom classes (beside the view controllers), customized View Controllers, third-party content, code that works only on iOS 5.0+ and code that works on previous versions. What I'm looking for is a solution to keep things organized in a manner that others (or myself in years to come) can look at this and understand the basic structure of the application and not get lost in the multiple files found therein.

share|improve this question

1 Answer 1

up vote 10 down vote accepted

There is no industry standard as such. You could look into sample Apple Source Projects to see how they do it..

You could however, try organizing your files into Groups & associate each group to a folder..

  • Organize all Controllers in One Group with Subgroup for each usecase.
  • Put all views in One Group and subgroup for each usecase.
  • Organize All Models in one Group
  • Put Third Party Libraries in Another Group with Subgroup for each Lib.

So on and So Forth.. Also, associate each group to a folder inside your project.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.