This iOS app interacts with The Movie Database (TMDB) API. Every line of code has been generated or suggested by AI using a large language model.
The codebase is currently under development, with core features implemented and more being added.
- Get a TMDB API key from themoviedb.org.
- Create a
Secrets.plist
file in the project root with the following content:<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>API_KEY</key> <string>your_api_key_here</string> </dict> </plist>
- Open the project in Xcode and build.
- Language: Swift
- UI Framework: SwiftUI
- Architecture: MVVM (Model-View-ViewModel)
- Networking: URLSession
- JSON Parsing: Codable
- Image Loading: AsyncImage
- Asynchronous Programming: Swift Concurrency
- State Management: @Published, @State, @Binding
- Dependency Injection: Manual (via init and @EnvironmentObject)
- UI Components: SwiftUI native components
- Build System: Xcode
- Minimum iOS Version: iOS 17.4 (as per current project settings)
- Browse movies by different categories (popular, upcoming, now playing, top-rated)
- Search for movies
- View detailed movie information
- Mark movies as favorites
- Apply filters (genre, release year, minimum rating)
- Toggle between light and dark themes
- Localization support
The app follows the MVVM (Model-View-ViewModel) architecture:
- Model: Represented by the
Movie
andMovieResponse
structs - View: SwiftUI views in various view files
- ViewModel:
NetworkManager
manages the app's state and business logic
- The
NetworkManager
fetches data from the TMDB API - Data is then exposed to the UI components via @Published properties
- UI components observe these properties and update when the data changes
The app uses URLSession
for network requests. The NetworkManager
class handles all API calls and data parsing.
The app uses SwiftUI's state management tools:
- @Published for observable object properties
- @State for view-local state
- @Binding for passing mutable state to child views
- @EnvironmentObject for dependency injection
The app supports dynamic theming with light and dark mode options. The ThemeManager
class handles theme selection and application.
The app supports localization with strings defined in Localizable.strings
.
- Atlantis: Used for network debugging