Using one of the two hypothetical scenarios below, please write a simple GitHub Direct Messaging app. Complete Document.
User Listing Screen | Chat Screen | No Data | Error |
---|---|---|---|
- Lists GitHub users fetched from network.
- Pagination for infininte scrolling.
- Users are sorted by recent chats.
- Chatting data is saved across application launches.
- Image caching is implemented for the user profile picture.
I used VIPER architecture to support main functionalities.
I used VIPER for User Listing and Chat screens. Controllers render ViewModels on the screen. Interactor handles API requests for user listing, while Presenters manages communication between Controller and Interactor. Router is responsible for the navigation between screens.
├── MerPayAssignment
│ ├── MerPayAssignment.xcodeproj
│ ├── Chat
│ │ ├── ChatView
│ │ ├── CoreDataModels
│ ├── Generic
│ ├── HeaderView
│ ├── Helper
│ ├── LocalStorage.xcdatamodeld
│ ├── Resources
│ │ ├── Assets.xcassets
│ │ └── LaunchScreen.storyboard
│ └── UserListing
│
└── MerPayAssignmentTests
Directory | Contents |
---|---|
Chat |
Chat Screen related files |
Chat/ChatView |
Chat View files |
Chat/CoreDataModels |
Chat core data files |
Generic |
General purpose classes. |
HeaderView |
Chat screen header view |
Helper |
Base classes |
LocalStorage.xcdatamodeld |
Core Data |
Resources/Assets.xcassets |
Icons |
Resources/LaunchScreen.storyboard |
LaunchScreen |
UserListing |
User Listing Views |
- User profile pictures flicker when scrolled very fast.
- Pagination is not smooth.