Small iOS client showing news from News API.
A small and clean iOS app for reading live news sourced from News API. Using 100% programmatic UI and no 3rd party modules.
- Xcode 12
- Swift 5
- iOS 13
- UIKit
- 100% programmatic UI (no storyboard)
- UITableView (both regular and diffable)
- Collapsible sections in table view
- Networking using URLSession
- JSON parsing using JSONDecoder
- Public API
- Async download of images
- SwiftLint
- Dark mode support
✅ Show news headlines
✅ Search in news
✅ Show article in WKWebView
✅ Share article
✅ Show sources
✅ Show source info
❇️ Filter sources based on country and/or language
❇️ Filter headlines based on country and/or language
❇️ Mark articles to read later
To run this app you need to register an account at the News API service (newsapi.org) and get an API key. Put this key in file called Key.plist
and you should be all set. For your conveninence, a Key-SAMPLE.plist
file has been included in the project.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>apiKey</key>
<string>YOUR_API_KEY_HERE</string>
</dict>
</plist>
This project uses SwiftLint in order to enforce Swift style and conventions. Some minor adjustments to the default rules in SwiftLint can be found in the file .swiftlint.yml
.
Headlines | Search | Article View |
---|---|---|
Sources | Source View |
---|---|
Issues and PR:s are encouraged and highly welcome.