DEV Community

Cover image for iOS System Design 25 days challenge
Scale to zero
Scale to zero

Posted on

iOS System Design 25 days challenge

Hey dev.to

I am taking the oath to finish 25 days challenge to do one system design from iOS every single day

If you have been looking out for help on iOS system designs and my post helps you please let me know I will harder and increase the number of questions i can cover everyday !

Day:1
Dt: 7/Sept:- Design a News Feed App
Can you try to design a news feed app in iOS ?
Answer :- I have designed a small system in which the app starts with AppDelegate / SceneDelegate

  1. On didfinishlaunch calls for the navigation manager:- This manager is a Singleton class and has its own viewmodel to handle the logic which screen to load on applaunch It could be a login screen or List of feeds for an already logged in user. This depends on the view model logic
  2. Lets say viewmodel logic tells its time to show login screen when first time the app was launched. Then we show a login screen which is not part of our scope for now. But let say we stored a flag - logged_in inside userdefaults when log in was succesful
  3. After which we open the Feeds List screen directly and this feature has view, viewmodel and a presenter layer. The viewmodel is the one that calls for data to be shown on the list, it passes the data to the presenter which is then applied proper mascara before passing it to the view which then displays the feeds
  4. The viewmodel here connects with a layer called data fetcher which internally calls two parts one is networking layer and the other one was the database
  5. Database passes all the data that it has but then also calls the feeds api to get the latest data.

I am done for today, I know my notes are not the best today, please keep patience with me, I will make it better everyday and oneday you will enjoy reading these articles.

Discussion (0)