Skip to content

Coderkube-App/swift-api-integration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Movie App (iOS / UIKit)

A simple and scalable iOS application to browse movie details using The Movie Database (TMDB) API. This project follows a Standard MVVM architecture approach with a generic network layer using URLSession/Alamofire.

Features

  • Fetch and display movie details
  • Scalable API integration using Alamofire
  • Standard MVVM Architecture and modular project structure
  • Pagination support for movie lists (Pull to refresh & Infinite scrolling)
  • Centralized API handling
  • Optimized network calls with error handling

Project Structure

swift-api-integration/
│
├── TheMovie/
│   ├── AppDelegate.swift
│   ├── SceneDelegate.swift
│   ├── AppNavigationViewController.swift
│   ├── CommonStuff/            # Network layer (API.swift), Endpoints, and Utilities
│   └── ViewControllers/        # UI Components
│       ├── MovieList/          # Movie List Screen (MVVM)
│       │   ├── MovieListViewController.swift & .xib
│       │   ├── DataModule/     # ViewModels & Models
│       │   ├── DataSource/     # UITableViewDataSource implementations
│       │   └── MovieCell/      # Custom Table View Cells
│       └── MovieDetails/       # Movie Details Screen

API Key Setup (IMPORTANT)

This project uses the TMDB API.

You must add your own API key before running the project. Steps:

  1. Create an account on TMDB
  2. Generate your API key
  3. Open the file: TheMovie/CommonStuff/API.swift
  4. Add your API key:
struct Config {
    static let BaseUrl = "https://api.themoviedb.org/3"
    static let APIKey = "YOUR_API_KEY_HERE"
}

Getting Started

  1. Clone the repository
git clone https://github.com/Coderkube-App/swift-api-integration.git
  1. Install Pods Ensure CocoaPods is installed (sudo gem install cocoapods).
pod install
  1. Open the project Open the generated TheMovie.xcworkspace.

  2. Run the app Select your target simulator/device and run the scheme (Cmd+R).

Tech Stack

  • Swift
  • UIKit
  • Alamofire (HTTP client)
  • CocoaPods

Notes

  • Do not commit your API key to public repositories
  • If API calls fail, check:
    • Internet connection
    • API key validity
    • Rate limits

Best Practices Used

  • Separation of concerns (Standard MVVM: ViewControllers, ViewModels, Models)
  • Reusable network layer
  • Data source decoupling

Future Improvements

  • Search movies
  • Favorites or Watchlist
  • Movie trailers
  • Dark mode support

Contribution

  • Feel free to fork and improve this project
  • Pull requests are welcome

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors