IOS Standard
IOS Code Standard 2021
Standard
- Design Pattern
- Layout
- Folder
- Security
- Documentation
- Best Practice
- Review Code
- Must Have Features
- Third Party
- Optional Third Party
Design Pattern
Model View ViewModel + RXSwift
Layout
- XIB File + Snapkit, Specific for 1 view
Folder
App
│─── Core
│ │─── Controllers
│ │ │ ...
│ │─── Extensions
│ │ │ ...
│ │─── Models
│ │ │ ...
│ │─── Resources
│ │ │ ...
│ │─── Services
│ │ │ ...
│ │─── Static Data
│ │ │─── Enum
│ │ │ │ ...
│ │ │ ...
│ │─── Subviews
│ │ │ ...
│ │─── Utils
│ │ │ ...
│ │─── ViewModels
│ │ │ ...
│─── Modules
│ │─── Login (example module name)
│ │ │─── Models
│ │ │ │ ...
│ │ │─── Subviews
│ │ │ │ ...
│ │ │ LoginViewController
│ │ │ LoginViewController.xib
│ │ │ LoginnViewModel
Folder | Description |
---|---|
Core | Is a subpackage for core and common class |
Core/Controllers | Is a subpackage for base controllers class |
Core/Extensions | Is a subpackage for extension class |
Core/Models | Is a subpackage for class model |
Core/Resources | Is a subpackage for external files |
Core/Services | Is a subpackage for all background related service packages/classes |
Core/Static Data | Is a subpackage for static data class/function |
Core/Static Data/Enums | Is a subpackage for static data enum type |
Core/Subviews | Is a subpackage for ui subclass of UIView |
Core/Utils | Is a subpackage for used global helper functions in module |
Core/ViewModels | Is a subpackage for base class of view |
Modules | Is a subpackage for class modules |
Security
- Keychain
- Jailbreak Detection
Documentation
- General function and method
- Flow method
Best Practice
- Environment: Scheme
- Style Guide: Airbnb
- Swiftlint (Install to Mac/Use brew)
Best Practice
- Memory management using Instrument
Must Have Features
- Deeplink
- Crashlytics
- Analytics
- Firebase Performance
- Versioning and Force update mechanism -> store update (optional) (There is an option for tolerance updates)
Third Party
- Alamofire
- RX
- Snapkit
- Kingfisher
- Dependency Injection
- Firebase crashlytics
- Firebase analytics
- Firebase performance
- Version