Skip to content

0xSiddhant/NewsApp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NewsApp

NewsApp is an iOS app built with UIKit + MVVM + Coordinator pattern to browse news using the NewsAPI service.

Features

Tab-based experience with 3 modules:

  • Home (Everything): keyword search across all articles, voice input search, and sort by relevancy/popularity/published date.
  • Heading (Top Headlines): top headlines with category filtering and quick access to in-app language/country filters.
  • Source: browse news providers by category/country/language and jump directly to the Home tab pre-filtered by source.
  • Pagination support for article/source listing.
  • In-app Safari reader for opening articles and source websites.
  • Persistent language/country preferences using UserDefaults.

Architecture

  • Coordinators: navigation wiring for each tab (EverythingCoordinator, TopHeadingCoordinator, SourceCoordinator).
  • ViewModel: API orchestration and UI state.
  • SupportingFiles/NetworkManager.swift: generic async networking layer using Alamofire.
  • Model: decodable response models for articles and sources.

Setup

  1. Create NewsApp/NewsApp/configuration.xcconfig.
  2. Copy values from NewsApp/NewsApp/configuration_example.xcconfig.
  3. Set your NewsAPI key in API_KEY.
  4. Build and run from Xcode.

Example configuration.xcconfig:

TRANSPORT_PROTOCOL_TYPE = https:
BASE_URL = newsapi.org
API_KEY = <YOUR_NEWSAPI_KEY>

Settings.bundle

The project includes a system Settings app entry at:

  • NewsApp/Settings.bundle/Root.plist
  • NewsApp/Settings.bundle/About.plist

What it contains

  • Root.plist: a root group with an About child pane. About.plist exposes read-only title/value rows for:
  • App Name (about.app_name)
  • App Version (about.app_version)
  • Powered By (about.apiEndpoint)
  • Showing News of region (country)

How values are updated

  • In AppDelegate, values for about.app_name, about.app_version, and about.apiEndpoint are populated at launch from app bundle/configuration values.
  • country maps to the same UserDefaults key used by the in-app settings panel (SettingPageController + UserDefaultsData.country), so the selected region is reflected in Settings.bundle.

Screenshots

1) Home / Everything tab

Search news by keyword, apply sort options, and open article details in Safari.

Home Screen

2) Top Headlines tab

Browse top headlines with category filtering and region/language-aware results.

Top Headlines Screen

3) Sources tab

Explore sources, view source details, and jump into source-specific article search.

Sources Screen

About

This App uses NewsAPI APIs to show news.

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages