PopcornTime is a premium, dark-themed iOS application designed for the modern cinephile. Built entirely with SwiftUI and SwiftData, it offers a seamless experience for browsing trending cinematic content, searching a global media database, and streaming trailers directly within a custom-engineered native playback environment.
Watch the App Demo on Google Drive 📱
- Key Features
- Full App Showcase
- Technical Showcase
- Tech Stack
- Getting Started
- Project Structure
- Contributing
- Live Discovery Hub: Real-time trending feeds for both Movies and TV Shows.
- Smart Global Search: Optimized query engine with background task throttling.
- Persistent Favorites: Full local lifecycle management via SwiftData (iOS 17+).
- Secure Native Playback: Custom
WKWebViewimplementation bypassing cross-origin restrictions for YouTube trailers. - Interactive Library: Offline download tracking and favorites management with swipe-to-delete support.
The following is a complete walkthrough of the PopcornTime interface and user journey.
- Home Feed: The landing experience featuring a high-impact Hero Spotlight with a blurred glassmorphism backdrop. It orchestrates multiple horizontal scrolling carousels for Trending and Top Rated content categories.
- Upcoming Feed: A focused vertical list pulled from TMDB's future cinematic release dates, providing a "coming soon" overview for movie enthusiasts.
- Universal Search: Supports both Movies and TV Shows via a simple toggle button in the navigation bar.
- Dynamic Grid: Utilizes an optimized
LazyVGridlayout that fetches image data asynchronously. The search is throttled to prevent API over-fetching while typing.
- Cinema Mode: When a title is clicked, the app automatically finds the official trailer via YouTube Data API v3.
- Security Bypass: Implements custom header handling to bypass
Error 153andError 152restrictions, embedding YouTube trailers natively within the app interface for a seamless watching experience.
- Collection View: A dedicated dashboard for all favorited and saved content.
- Local Persistence: Powered by SwiftData, ensuring that your saved movies and shows are available instantly even without an internet connection. Includes a smooth list-edit interface with swipe-to-delete native behavior.
Standard iOS web-views often crash when embedding YouTube iFrames due to Referer header validation. PopcornTime implements a secure HTML-injection proxy:
// We bypass strict origin headers by loading a localized iframe protocol
let html = """
<iframe src="https://www.youtube.com/embed/\(key)"
referrerpolicy="strict-origin-when-cross-origin"
allowfullscreen></iframe>
"""
webView.loadHTMLString(html, baseURL: URL(string: "http://localhost/"))Leveraging iOS 17's SwiftData, the app maintains a lightweight local database for favorites and downloads, ensuring your library is always accessible offline.
- UI Framework: SwiftUI (Declarative UI)
- Data Layer: SwiftData (Reactive persistence)
- Networking: Native
URLSessionwith Async/Await - Media:
Webkit/WKWebViewfor secure trailer delivery - Architectural Pattern: MVVM (Model-View-ViewModel)
PopcornTime/
├── PopcornTime/
│ ├── Assets.xcassets/ # Cinematic assets and App Icon
│ ├── ViewModels/ # Logic-heavy Search & Video states
│ ├── Views/ # Modular SwiftUI Components
│ ├── Models/ # SwiftData Titles & TMDB Schema
│ └── APIConfig.swift # Secure Key Management
├── Screenshots/ # Documentation Visuals
└── PopcornTime.xcodeproj # Project configuration
- Xcode 15.0+
- iOS 17.0+ (Simulator or Physical Device)
- TMDB API Key (Get one here)
- YouTube Data API v3 Key (Get one here)
The app uses a secure APIConfig.json file.
- Copy the example:
cp PopcornTime/APIConfig.example.json PopcornTime/APIConfig.json - Open
APIConfig.jsonand insert your keys.
Push Cmd + R in Xcode to launch the cinematic experience.
Contributions are welcome! If you have a feature request or a bug fix:
- Fork the repo.
- Create your branch (
git checkout -b feature/AmazingFeature). - Commit your changes.
- Push to the branch.
- Open a Pull Request.
Made by MOHIT KOURAV







