Third party management
Cocospod - the most common used tool in iOS development, It ls simple to manage frameworks for different targets. I chose dynamic framework default
Coding style Check
Swiftlint - I integrated the Swiftlint into the project, it helps me to correct the coding style.
It follows the github offical swift coding style. the configyml is under the root directory
Net
Moya - It construct a middle layer between my own bussiniess and alamofire, it is very elegant.
It is friendly to add extensions and plugins.
Assets Management
R.swift - I could avoid the compiling error when writing literal code, just like “hello.jpxxg”.
It is similar to android
The basic architecture
MVVM
view - MainViewController\UserViewCell, etc
model - UserViewModel
viewmodel - UserViewModel
UserViewModel is responsible for the data flow and ui interaction
UI Test
viewModel responsibles for the test task mainly
Test the successful request
Test the empty request
Test the fail request
FakeApiClient - mock the long name
What would be more good(不足之处)
数据解析 最好用全手动方式,否则单个字段可能造成所有解析失败
UI Test欠缺