Demo_Posts-List

Demo App to list Post from a JSON file (simulating request) Use a mock for this purpose. Implementation using RxSwift, in MVVM pattern.

Clone the respository following (You can follow the Github) or make a Fork from the branch-master

Screenshot 2023-05-27 at 04 21 24

Open the terminal and search the path where you clone the repository and use the comand “pod install” (Note- Previously you must get installed CocoaPods in your mac)

Screenshot 2023-05-27 at 03 24 13

When the pods are correctly installed you can see New Files please open the file with .xcworkspace extension “Demo_Posts List.xcworkspace”

Screenshot 2023-05-27 at 03 24 19

Inside the XCode, make secure than You are in the branch Master and wait than all the process has finished so Choose iPhone 14 Pro as Emulator to compile after that you can Run the App

Screenshot 2023-05-27 at 03 28 09

Don’t forget you can run the test too with shortcut “COMMAND + U”

Screenshot 2023-05-27 at 04 18 58 Screenshot 2023-05-27 at 04 18 47

When the app is running Now we can see the behavior with the follow functionality described bellow.

Show Posts List:

When the app appear, you can watch a fake requested of List of Posts From a File

Simulator Screenshot - iPhone 14 Pro - 2023-05-27 at 02 55 08

Insert Posts:

To add a new Post, you must click to the button ‘+’ on right-top of the view. Then You will see an alert with TextField waiting for Name and Description to Add.

Simulator Screenshot - iPhone 14 Pro - 2023-05-27 at 02 57 45

Simulator Screenshot - iPhone 14 Pro - 2023-05-27 at 02 58 28

If you don’t type some of both textField then you’ll see an alert Advice with the specific text .

Simulator Screenshot - iPhone 14 Pro - 2023-05-27 at 03 09 54

Also if you try to add an existing post (exactly the same name and description) the app’ll show you a specific alert advice

Simulator Screenshot - iPhone 14 Pro - 2023-05-27 at 03 12 00

Remove Posts:

To delete any Post , please use slide on the left gesture with your fingers or mouse. If you do it from the right side to the left side the post will be removed from the list.

Simulator Screenshot - iPhone 14 Pro - 2023-05-27 at 03 00 08

Also you can make a small slide gesture from the right side to the left side, then the app’ll show you a new Item for delete in the items expected

Simulator Screenshot - iPhone 14 Pro - 2023-05-27 at 03 00 31

Simulator Screenshot - iPhone 14 Pro - 2023-05-27 at 03 00 40

Filter Posts:

Introduce a letter or word to search in the list in the textField on the top of the view so anytime than you type a letter the app’ll be searching and filtering elements from the post list

Simulator Screenshot - iPhone 14 Pro - 2023-05-27 at 03 02 09

If you filter by words than doesn’t exist in the list or you removed all the posts then the app will show you an empty image state

Simulator Screenshot - iPhone 14 Pro - 2023-05-27 at 03 02 18

GitHub

View Github