iOS Live Coding Exam 1
- Pre Session: 15 minutes
- Clone source code, run
podand try to run app with XCode - Read exercises carefully and prepare the solution
- 5 minutes to show up solution before start coding
- Coding Session: 60 minutes
- Must implement all Required exercise
- Require the code can be complied and run success on iPhone Simulator
- Can use all third parties, includes all third parties that already set up
- Interviewer can make questions during this session
- Post Session: 15 minutes
- Candidate zip the code and send to interviewer
- Interviewer ask about pros and cons about the solution and implementation
- Candidate needs give more solutions about some improvements or new features
- XCode: 12.5 or above
- Cocoapod: 1.11.2 or above
- Library is already set up:
- KingFisher: image loader
- RxSwift: reactive programming library
App has 2 tabs:
- Tab 1: Sample
- Load list of
Contactwith show on screen withavatarnameandaddress - The data of contacts is pulled from assets file
/data/contacts.json
- Tab 2: Exam
- Here is tab that candidate will start implement
Rebuild
- Refactor
- Analyze current code in tab 1 and show up the current
issueand then fix it
- Rebuild
In tab 2, rebuild the contact list with required:
- Use and refactor the current MVVM model in tab 2
- Use SwiftUI
- Use Combine or RxSwift to build asynchronous
- Use SwiftUI @ViewBuilder to build
loading screenwhen fetching API - Build one more screen Contact Detail (with defined UI) and navigate from list to detail
- The
avatarimage on screen must belazy loadingwithplaceholder
- Show age-class
youngmiddle-ageoldwith conditions:young: age < 30middle-age: age >= 30 && age < 60old: age >= 60
- Write unit test for the function to identify
age-class
- Update
Startbutton toRefreshbutton in case the list is loaded. Touch onRefreshbutton, call API and reload the contact list - Cache the contact list in
2 minutes, don't all API if cache data still is valid, even relaunch the app
- Refactor
- Rebuild



