- Xcode 10.2
- Swift 5
Framework | Usage | Detail |
---|---|---|
RxSwift | Swift version of Rx | |
RealmSwift RxRealm |
Mobile database | 1. Easy set up 2. Better support Rx 3. Cross platform support(Such as Android) 4. Faster performance 5. Easy encrpytion 6. Free 7. No limit to data storing |
KeychainAccess | Swift wrapper for Keychain | Use for saving database encryption key |
Swinject SwinjectStoryboard |
Lightweight Dependency Injection (DI) framework for Swift. | Implements Inversion of Control (IoC) for resolving dependencies. Swinject helps your app split into loosely-coupled components, which can be developed, tested and maintained more easily. |
SDWebImage | Async image downloader with cache support |
Model-View-ViewModel (MVVM) Design Pattern
Feed
, User
are models used in UI layer.
FeedRM
, UserRM
are realm object, which are strictly used in database layer.
Contains series of observables, which are ready to display, or only need simple compute logic.
Send request to service layer, but not process heavy business logic.
Layout views if necessary, bind to display series of observables. Should not contains any business logic.
Process specific business rule(or single user case)
Wrapper classes for realm or keychain, which can be reused.
- Use storyboard Auto Layout, reduce code lines
- Use Collection View, which is more powerful and flexible than table view
Protocols | Methods | Details |
---|---|---|
MockTokenService |
getToken() |
Mock server to generate token |
MockServerService |
signUp() signIn() getFeeds() postFeed() |
getFeeds() : Every company has specific policy to query newest info(such as by created time), in this mock we will query by id |
24 tests
1 test
Jenkins and Fastlane