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

Core folder Image
Core folder Image
Modules folder Image
Modules folder Image

App 
│─── Core
│	│─── Controllers
│	│	│ 	...
│	│─── Extensions
│	│	│ 	...
│	│─── Models
│	│	│ 	...
│	│─── Resources
│	│	│ 	...
│	│─── Services
│	│	│ 	...
│	│─── Static Data
│	│	│─── Enum
│	│	│	│ 	...
│	│	│ 	...
│	│─── Subviews
│	│	│ 	...
│	│─── Utils
│	│	│ 	...
│	│─── ViewModels
│	│	│ 	...
│─── Modules
│	│─── Login (example module name)
│	│	│─── Models
│	│	│	│ 	...
│	│	│─── Subviews
│	│	│	│ 	...
│	│	│ 	 LoginViewController
│	│	│	 LoginViewController.xib
│	│	│	 LoginnViewModel
FolderDescription
CoreIs a subpackage for core and common class
Core/ControllersIs a subpackage for base controllers class
Core/ExtensionsIs a subpackage for extension class
Core/ModelsIs a subpackage for class model
Core/ResourcesIs a subpackage for external files
Core/ServicesIs a subpackage for all background related service packages/classes
Core/Static DataIs a subpackage for static data class/function
Core/Static Data/EnumsIs a subpackage for static data enum type
Core/SubviewsIs a subpackage for ui subclass of UIView
Core/UtilsIs a subpackage for used global helper functions in module
Core/ViewModelsIs a subpackage for base class of view
ModulesIs a subpackage for class modules

Security

  1. Keychain
  2. Jailbreak Detection

Documentation

  • General function and method
  • Flow method

Best Practice

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

Optional Third Party