Code Swift iOS app showcasing basic movies list from Orange TV API.

Overview

iOS Code Test - Optiva Media

Code Swift iOS app showcasing basic movies list from Orange TV API.

Built using XCode 13.0 (Swift 5)

How to run the example?

  1. Clone this repo
  2. Open shell window and navigate to project folder
  3. Open Code Test.xcodeproj and run the project on selected device or simulator

How was it created?

  1. Using MVC-C, using coordinator design pattern for navigation
  2. This app contains two views, the main movie view where you will see all movies and detail movie view when you can see detail information about movie which you click on.
  3. Favourite responsability has been given to a class which control access to favourite data ( save up in User Defaults ).
  4. All data which need to be persistance has been saved up using User Defaults. Accesing User Defaults is managed by UserDefaultsManager, a class created unique for User Defaults managenment purpouses.
  5. Conection to server is managed by NetworkLayer which use two models RequestModel & ResponseModel.
  6. There is one file called Service which is the intermediate layer beetween views and network layer.
  7. Add bridging header - see file Particle-Bridging-Header.h for reference.
  8. UserDefaultsManager, NetworkLayer, FavouriteManager use singleton as a design pattern.

Code

MovieViewController invoking Service setup inside viewWillAppear method calling getAllMovies methods inside Service. When movies are downloaded, view is configurated according to server response given by NetworkLayer, then all the content is showed using UITableView. If you click on movie, view controller invokes didSelectRowAt from UITableViewDelegate creating a detail view throughout Coordinator Pattern for getting more details about movie which was clicked on. DetailMovieViewController invoking Service setup twice inside viewWillAppear method calling getDetailMovie and getMoviesRecommendations for getting data for this movie. When data is downloaded, view configure all content with labels, buttons, images and finally all recomendations are configured inside collectionView using UICollectionView When you click on favourite button (add/remove from favourite) invokes FavouriteManager class (througout singleton) which has some methods for accesing favourites. You can add/remove to/from favourite in MainView using swipe actions in each table cell or inside detail view clicking on the button add favourite/remove favourite.

To invoke setup using Coordinator:

	guard let windowScene = (scene as? UIWindowScene) else { return }

	//load coordinator
	self.window = UIWindow(windowScene: windowScene)

	//create navigation controller
	let navController = UINavigationController()

	//init coordinator
	self.coordinator = MainCoordinator(navigationController: navController)

	//go to movies page
	coordinator?.start()

	//configurate window
	window?.rootViewController = navController
	window?.makeKeyAndVisible()

This coordinator var refers to CordinatorPattern declared on MainCoordinator File: var coordinator: MainCoordinator?

UI/UNIT test have been created (only as a demostration purpouse). They only pretend to show the testing ability.

This project has not have any third library since I think all functionalities can be created using native techonologies and it can be the needed code proof you need for recruitment proccess. This project has been made in 10-12 hours distributed in 1 week completely coding approximately.

For questions - refer to Code Test mobile developer here: https://manumartinez.es

Best Regards!

You might also like...
A basic todo app using swift
A basic todo app using swift

Toodoo A basic todo app Features Basics Today List Categorize Prioritize Future Tasks Support Pictures Reorder Tasks Cross platform Quick Entry Analyz

This is a basic twitter app to view, compose, favorite, and retweet tweets.
This is a basic twitter app to view, compose, favorite, and retweet tweets.

Twitter - Part II This is a basic twitter app to view, compose, favorite, and retweet tweets. Time spent: 6 hours spent in total User Stories The foll

A simple in iOS to demonstrate a basic MVVM architecture.

Repository A Simple iOS application in swift with MVVM-C architecture. Achitecture This project build on MVVM-C (Model, View, ViewModel, Coordinator)

An example of using the GPU on M1 arm64 Macs for basic compute functions

M1-GPU-Compute Using Swift and Apple's Metal API to utilize the GPUs on M1 equipped Macs Adding Two Arrays CPUs perform computations sequentially, wai

A simple app that downloads a list of albums from iTunes and displays it in a table

A simple, sample app that downloads a list of albums from iTunes and displays it in a table. It also allows the user to bookmark albums which are then

Advanced Catalyst Example with sidebar, list view, SwiftUI detail view, toolbar & AppKit bundle
Advanced Catalyst Example with sidebar, list view, SwiftUI detail view, toolbar & AppKit bundle

Advanced Catalyst Example This is an example of a Catalyst app using a three-column layout, with a primary toolbar. It includes topics such as: Drag &

 RxFlow With SwiftUI (List To Detail)
RxFlow With SwiftUI (List To Detail)

RxFlow With SwiftUI (List To Detail) About RxFlow + SwiftUI Very Simple Example [List View] - [Detail View] Navigation System : UIKit + RxFlow UI : S

UIKit Chat List Sample
UIKit Chat List Sample

When I tried to make a UI like this, I faced a problem. When keyboard appears, TableView doesn't scroll automatically. I wanted to make the feature tableview scrolls automatically so I tried to make this project. Below images describe the difference without feature and with feature properly.

Owner
Manu Martinez
I am an entrepreneur with some business attempts and with tons of rejections, an enthusiasm and motivated person who loves technology development.
Manu Martinez
Flix is an app the uses the the movies database to get upcoming movies, with infinite scrolling

Flix Flix is an app the uses the the movies database to get upcoming movies, with infinite scrolling Libraries Flix uses Swift Package Manager (SPM),

null 0 Oct 31, 2021
Code challenge iOS - Movies app

Code challenge iOS - Movies app Project structure The Common folder contains sha

Danny Narvaez 0 Dec 21, 2021
Flix is an app that allows users to browse movies from the The Movie Database API.

Flix is an app that allows users to browse movies from the The Movie Database API.

null 1 Apr 5, 2022
An app that allows users to browse movies from the The Movie Database API

Flix Flix is an app that allows users to browse movies from the The Movie Database API. ?? NOTE - PASTE PART 2 SNIPPET HERE: Paste the README template

Akylbek Khamitov 0 Dec 3, 2021
Flix - an app that allows users to browse movies from the The Movie Database API

Flix Flix is an app that allows users to browse movies from the The Movie Database API. Flix Part 2 User Stories REQUIRED (10pts) (5pts) User can tap

Matthew Dong 1 Feb 20, 2022
CarListing app allows user to see list of cars on map as well as in the list

Car Listing CarListing app allows user to see list of cars on map as well as in the list. Features See List of cars on map in the home screen. User ca

Niraj Kumar Jha 0 Oct 13, 2021
KinoLenta - App for searching movies and creating watchlists based on open movie databases

KinoLenta App for searching movies and creating watchlists based on open movie d

LuckyDmitry 1 Feb 10, 2022
A simple application for watching movies

A simple application for watching movies

Roman 1 Jun 10, 2022
This sample app use the Star Wars public api to show a list of characters

StarWars-MVVM In this sample app, I use the Star Wars public api to show a list of characters from the Star Wars movie series. There are two goals I w

Paul O'Neill 1 Mar 8, 2022
IOS-Application-3 - A basic calculator app for iOS compatible to any layout and screen size

Calculator It is a basic calculator app for iOS compatible to any layout and scr

Kushal Shingote 1 Feb 2, 2022