How to create a structured Xcode project

A step by step tutorial on our recommended folder structure and reasoning for iOS & MacOS.

Oscar de la Hera Gomez
Written by Oscar de la Hera Gomez
First published on 07/11/2022 at 16:51
Last Updated on 07/12/2022 at 15:24
A flower that represents Swift next to a flower that represents Xcode. Beneath it sits 'Swift Folder Structure'

A step by step tutorial on our recommended folder structure and reasoning for iOS & MacOS.

The following step by step tutorial walks you recommended folder and file structure.

Download open source projectHow to add SwiftLint to an Xcode ProjectDownload Xcode

Create the folder structure

A screenshot of Xcode showing our folder structure.

Our recommended folder structure is shown in the image above. We recommend to create folders for the items below.

Files

This is where you will have all your files such as fonts, videos or images associated with your app.

Models

This will hold your models. As a starter, we recommend creating folders for States, Notifications, Constants.

User Interface (UI)

This is where you will place all your user interface files. We recommend you split it into Screens and Components, each of which will have a folder for each screen or component of your app.

Coordinators

This is where you will hold all your Coordinators that coordinate the content, language or other functionality of your app. We recommend that you make each of these a singleton with their own folders.

RootViewController

This holds the Viewcontroller which will house all your screens and which coordinates changing between screens.

Download open source project

Looking for more XCode tutorials ?

How to create a SwiftLint enabled Swift Xcode ProjectHow to add a Swift Package Manager package dependencyRecommended .gitignore for Swift projects in XCode

Any Questions

We are actively looking for feedback on how to improve this resource. Please send us a note to inquiries@delasign.com with any thoughts or feedback you may have.

SubscribeInquireView All PostsView All ServicesView All Work

Partner with us

We would love to get to know you and see how we can help your organization with its goals and needs.
Let's Talk

Stay Informed

Get occasional updates about our company, research, and product launches.
Subscribe