Skip to content

OneDroid/iPodcast

Repository files navigation

iPodcast - Modern Podcast Player

A clean, modern podcast player app for iOS built with SwiftUI and Clean Architecture principles.

Features

  • 🎙️ Browse trending podcasts
  • 🔍 Search for podcasts
  • ⭐ Subscribe to your favorite podcasts
  • 📱 Clean, modern UI with smooth animations
  • 🎵 Audio playback with controls (play, pause, skip forward/backward)
  • 📊 Episode list with details
  • 💾 Local subscription management

Architecture

The app follows Clean Architecture principles with clear separation of concerns:

iPodcast/
├── Domain/                 # Business Logic Layer
│   ├── Entities/          # Core business models (Podcast, Episode)
│   ├── Repositories/      # Repository protocols
│   └── UseCases/          # Business use cases
├── Data/                   # Data Layer
│   ├── Network/           # API services
│   ├── DTOs/              # Data Transfer Objects
│   ├── Repositories/      # Repository implementations
│   └── Local/             # Local storage (UserDefaults)
├── Presentation/           # Presentation Layer
│   ├── Home/              # Home screen (podcast list)
│   ├── Detail/            # Podcast detail screen
│   ├── Player/            # Audio player screen
│   └── Components/        # Reusable UI components
└── Core/                   # Shared utilities
    ├── Constants/         # API constants
    └── Extensions/        # Swift extensions

Setup Instructions

1. Get PodcastIndex API Credentials

  1. Visit PodcastIndex API
  2. Sign up for a free account
  3. Get your API Key and API Secret

2. Configure API Credentials

Open iPodcast/Core/Constants/APIConstants.swift and replace the placeholder values:

enum APIConstants {
    static let baseURL = "https://api.podcastindex.org/api/1.0"
    
    // Replace with your actual credentials
    static let apiKey = "YOUR_API_KEY"
    static let apiSecret = "YOUR_API_SECRET"
    
    // ...
}

3. Build and Run

  1. Open iPodcast.xcodeproj in Xcode
  2. Select your target device or simulator
  3. Press Cmd + R to build and run

Requirements

  • iOS 16.0+
  • Xcode 15.0+
  • Swift 5.9+

Key Components

Home Screen

  • Displays trending podcasts
  • Search functionality with debouncing
  • Subscribed podcasts appear at the top
  • Subscribe/unsubscribe toggle

Podcast Detail Screen

  • Shows podcast information and artwork
  • Lists all episodes
  • Subscribe button
  • Tap episode to play

Player Screen

  • Full-screen audio player
  • Artwork display
  • Playback controls (play/pause, skip ±15s)
  • Progress slider
  • Time display

Mini Player

  • Persistent mini player at the bottom
  • Shows currently playing episode
  • Quick play/pause control
  • Tap to expand to full player

Technologies Used

  • SwiftUI - Modern declarative UI framework
  • Combine - Reactive programming
  • AVFoundation - Audio playback
  • URLSession - Networking
  • CryptoKit - API authentication
  • UserDefaults - Local data persistence

Clean Architecture Benefits

  1. Separation of Concerns - Each layer has a single responsibility
  2. Testability - Business logic is independent of UI and frameworks
  3. Maintainability - Easy to understand and modify
  4. Scalability - Easy to add new features
  5. Independence - UI, database, and external services are replaceable

API Integration

The app uses the PodcastIndex API with SHA1 authentication:

  • Search Podcasts - /search/byterm
  • Trending Podcasts - /podcasts/trending
  • Get Episodes - /episodes/byfeedid

Data Flow

View → ViewModel → UseCase → Repository → NetworkService → API
                                    ↓
                              DTO → Entity

Future Enhancements

  • Download episodes for offline playback
  • Playback speed control
  • Sleep timer
  • Episode bookmarks
  • Playlist creation
  • iCloud sync for subscriptions
  • CarPlay support
  • Widget support

License

This project is for educational purposes.

Author

Tawhid Monowar


Note: Make sure to add your PodcastIndex API credentials before running the app!

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages