A clone of the Netflix application developed using SwiftUI and UIKit, employing the MVVM architecture. The project features a modern and dynamic interface inspired by the original app's design, including search functionality, movie viewing, and recommendation management.
- Requirements
- Technologies Used
- Screens
- Project Architecture
- Features
- Installation
- Usage
- Testing
- References
- Contributions
- How to Contribute
- License
Before starting, make sure you have the following requirements installed:
- Xcode (Version 16.0 or higher)
- macOS (Version 15 or higher)
- Swift 6
- XcodeGen For project generation.
- Swift 6: Main programming language.
- SwiftUI: For building the user interface.
- UIKit: For integrating with existing components and gaining more control over the UI.
- MVVM (Model-View-ViewModel): For separating concerns and better code organization.
- XCTest, Testing, Unit and UI: Used to do the tests.
- XcodeGen: A tool for generating Xcode projects from YAML files.
- URLSession: Used to make project requests.
- Combine: For customize the handling of asynchronous events.
- Testing: For additional unit tests.
- Swift Snapshot Testing: To test the appearance of the interface in different states.
- API public: https://developer.themoviedb.org/docs/getting-started
- SDWebImageSwiftUI: Image loading.
The MVVM architecture was chosen for this project, providing a clear separation between business logic (Model), presentation logic (ViewModel), and the user interface (View).
NetflixClone
│
├── NetflixClone
│
├── NetflixCloneSample
│
├── NetflixCloneTests
│
├── NetflixCloneUITests
│
- Navigation: Intuitive navigation between different sections of the app.
- Search: Search functionality to find movies and series.
- Recommendations: Display of personalized recommendations for the user.
- Movie Details: Viewing detailed information about movies and series.
To install and run the project, follow the steps below:
- Install XcodeGen (if you haven't already):
brew install xcodegen
- Clone the repository:
git clone https://github.com/jovitorneves/NetflixCloneSwiftUI.git
cd NetflixCloneSwiftUI
- Generate the Xcode project
xcodegen
- Open the Project in Xcode
Navigate to the directory where you cloned the project and open the .xcodeproj
file in Xcode.
open NetflixClone.xcodeproj
- Run in Simulator or Device
In Xcode, select the target (simulator or physical device) and click the Run button (play icon) to build and run the application.
If you encounter a "permission denied" error while running xcodegen, it may be due to insufficient permissions for the current user. Here are a few solutions to resolve this issue:
- Check File Permissions: Ensure that you have the correct permissions for the project directory. You can change the permissions by running:
chmod 755 scripts/{change_to_file_name}.sh
After opening the application, you will be able to navigate through the sections and explore the available features. The interface is designed to be intuitive, similar to the experience of the original Netflix application.
The project includes unit and UI tests to ensure the quality and reliability of the code.
Unit tests have been implemented using XCTest
and Testing
. To run the tests, follow these steps:
Testing example: StringExtensionsTests.swift
UI tests have been implemented using XCTest
to ensure that the UI functions as expected under different conditions.
Snapshot tests have been implemented using the Swift Snapshot Testing library to ensure that the appearance of the interface matches expectations.
- SwiftUI
- XCTest
- Swift Snapshot Testing
- Apple Testing Documentation
- SwiftUI Property Wrappers
- XcodeGen
- Combine
- Themoviedb
- SDWebImageSwiftUI
Contributions are welcome! Feel free to open issues or pull requests.
- Fork the project.
- Create a new branch (
git checkout -b feature/new-feature
). - Commit your changes (
git commit -m 'Add new feature'
). - Push to the branch (
git push origin feature/new-feature
). - Open a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.