How do You structure an iPhone Xcode project?

Scott McKenzie picture Scott McKenzie · Oct 21, 2010 · Viewed 17k times · Source

What are good ways of building groups/folders?

I've tried by feature (UI for a feature plus model etc) with a common group. I've also tried by UI, model, etc.

The former keeps like things together which fits the iPhone paradigm nicely. The latter means I jump around a bit more.

What do you think?

Answer

A.G picture A.G · Sep 21, 2015

The standard Xcode MVC folder structure is as follows.

  1. CoreData : Contains DataModel and Entity Classes.

  2. Extension : Contain One class(default apple class extensions+project class extensions.)

  3. Helper: Contain Third Party classes/Frameworks (eg. SWRevealController) + Bridging classes (eg. Obj C class in Swift based project)

  4. Model : Make a singleton class (eg.AppModel - NSArray,NSDictionary, String etc.) for saving data. The Web Service Response parsing and storing data is also done here.

  5. Services : Contain Web Service processes (eg. Login Verification, HTTP Request/Response)

  6. View : Contain storyboard, LaunchScreen.XIB and View Classes. Make a sub folder Cells - contain UITableViewCell, UICollectionViewCell etc.

  7. Controller: Contain Logic or Code related to UIElements (eg. UIButton’s reference+ clicked action)