Prerequisites

For the Swift Package (FeedReaderCore), you need Swift 5.9+ and the iOS 14+ deployment target.

Installation

Clone & Open

# Clone the repository git clone https://github.com/sauravbhattacharya001/FeedReader.git cd FeedReader # Open in Xcode open FeedReader.xcodeproj

Build & Run

  1. Open FeedReader.xcodeproj in Xcode
  2. Select an iPhone simulator (iPhone 5S or later)
  3. Press โŒ˜R to build and run

Using the Swift Package

If you want to use FeedReaderCore in your own project:

// In your Package.swift dependencies: [ .package( url: "https://github.com/sauravbhattacharya001/FeedReader.git", from: "2.0.0" ) ]

Or in Xcode: File โ†’ Add Package Dependencies โ†’ enter the repository URL.

Using the App

Reading Stories

On first launch, FeedReader loads BBC World News. Stories appear in a table view with titles, descriptions, and thumbnails. Tap any story to see the full description and a link to the original article.

Managing Feeds

Tap the ๐Ÿ“ก antenna icon in the navigation bar to open the Feed Manager:

Bookmarks

Search

Pull down on the story list to reveal the search bar. Search queries filter across story titles and descriptions in real time.

Offline Mode

When the device goes offline:

Configuration

Changing Default Feeds

To change the feeds available on first launch, edit the presets array in Feed.swift:

static let presets: [Feed] = [ Feed(name: "My Blog", url: "https://myblog.com/rss.xml", isEnabled: true), Feed(name: "Tech News", url: "https://technews.com/feed/"), // ... ]

Testing

Running Tests

  1. Open FeedReader.xcodeproj in Xcode
  2. Press โŒ˜U to run all tests
  3. Or open the Test Navigator (โŒ˜6) and run individual suites

Test Suites

SuiteCoverageDescription
BookmarkTests20 casesBookmark add, remove, toggle, persistence, deduplication
FeedManagerTests35 casesFeed CRUD, preset loading, persistence, validation
StoryTestsCore modelNSCoding serialization, equality, hash
StoryModelTestsExtendedEdge cases, HTML stripping, URL validation
SearchFilterTestsSearchTitle/description matching, empty queries, special characters
XMLParserTestsParserValid XML, malformed XML, missing fields, encoding
ViewControllerTestsUIView controller lifecycle, table view data source
FeedReaderCoreTestsSPMSwift Package module integration tests

Test Fixtures

XML test fixtures are in FeedReaderTests/:

CI/CD

FeedReader uses GitHub Actions for continuous integration:

WorkflowTriggerWhat It Does
ci.ymlPush / PR to masterBuild + test on macOS with Xcode
codeql.ymlPush / PR / scheduleCodeQL security scanning for Swift
pages.ymlPush to master (docs/)Deploy documentation site to GitHub Pages
docker.ymlPush / PRDocker image build verification