Installing the Clean Swift Template in Xcode

Clean Swift becomes more and more popular amongst iOS Developers. This short tutorial will show you how to install the template in Xcode and start using it for your next great projects.

#1 Download the Template

I have uploaded it on Google Drive. You can download the latest template from this link.

#2 Install the Template

After unzipping the file, you should open Terminal and access the root directory of the folder by using cd CleanSwift .

Now, all you have to do is running the following command make install_templates. If you wish to uninstall the template just run make uninstall_templates.

To verify if the template has been installed properly, you should open the following path ~Library/Developer/Xcode/Templates/File Templates and search for a folder named CleanSwift.

#3 Create a New Scene

Assuming everything went well in the above steps, I will now show you how to create a new Scene. Create a new test project (or open some of your existing ones), and go to File -> New -> File (or press ⌘N) which will open the Xcode templates window.

Scroll to the bottom of the list and you should see the CleanSwift section with all the files. In 100% of the cases when you create a CleanSwift template, you will use a Scene. By pressing on the Scene and adding the desired name, it will generate all the needed files at once.

That's it from this tutorial and I hope that it helped you start with this amazing Swift architecture. 👏 or share so others like you can find it.

Thank you for your attention! 🚀


If you want to learn more about Clean Swift, please visit the below story where I am making an introduction to the architecture. 👇

NOTE: The above tutorial is based on the first version of the CleanSwift template, but the general principles are still used in the latest one. I will update the link with the new story when I finalize it.