🚀1/10 How to Structure Your iOS Projects: A Guide for Clean, Organized Code 📱 Do you struggle with finding files in your iOS projects? Tired of messy project structures? This thread is for YOU! Time to level up your project organization skills.👇 [thread] #iOSDev #SwiftLang
👏2/10 Shoutout to Artiom Khalilyaev Before diving in, a big thank you to Artiom Khalilyaev for his insightful Medium article on this topic! This thread summarizes his ideas, so be sure to check it out: medium.com/gitconnected/t…
🔎3/10 Common Mistake: Grouping by MVC Components Many junior devs group files based on MVC components (Views, Controllers, Models). It works for small projects, but imagine 20+ screens & controllers! Chaos!🌪️ There's a better way! #iOSDevelopment #Xcode
🎯4/10 Hallmark of a Well-Structured Project Imagine a dev who's never seen your project can quickly find what they need! That's the sign of a well-structured project. So, how do you achieve this? #iOSDev #BestPractices #CodeOrganization
📁5/10 Best Practice: Group by Module Instead of grouping by MVC components, group related files together. Create a folder for each module, including its view controller, view model, model, and subviews. Then place these folders in a Modules directory. #SwiftLang #CodeStructure
🔧6/10 Reusable Views Two types of reusable views: App-wide views (e.g. buttons, textfields) ➡️ /UIComponents folder Module-specific views ➡️ /Subviews or /Components folder within the module #iOSDevTools #SwiftLang #UIKit
🛠️7/10 Services Place all services in a /Services or /Managers folder. Create a subfolder for each service to store related files (e.g. APIService, protocol, DTOs, etc.). #iOSDevelopment #SwiftLang #CleanCode
📚8/10 Other Files Keep the root directory clean! Place resources, extensions, JSON/CSV files, etc., in a /Common folder. Create subfolders as needed (e.g. /Resources, /Extensions, /JsonFiles). #iOSDev #CodeOrganization #Swift
🎓9/10 Conclusion Organizing your project from the start is essential. Set the structure, and new devs joining your team will follow suit. Say goodbye to messy codebases! #iOSDevelopment #BestPractices #Xcode
📣10/10 Your Thoughts? What do you think of this approach? Share your thoughts in the comments below! And don't forget to follow @iOSDevTools for more tips. Thanks again to Artiom Khalilyaev for his fantastic article!👩💻👨💻 #iOSDevCommunity #SwiftLang #CleanCode