Table of Contents
This iOS app aggregates blog posts written by SwiftLee (Antoine van der Lee). SwiftLee has a weekly blog on Swift and iOS software development.
Note that this app is only a SwiftLee aggregator and not an app developed by SwiftLee. The author of the blog posts (SwiftLee) has no responsibility for the aggregator app. And the developer of the app (vdHamer) has no control over the postings. In case you are wondering, both parties did align 🙂.
The aggregator uses a small database containing the metadata (title, date, URLs) of the postings on the SwiftLee site. It does not contain the blog posts themselves. When the app launches, the database is updated in background by fetching the SwiftLee website's RSS feed, passing the RSS through an online RSS-to-JSON convertor, decoding the JSON to memory, and merging the in-memory data with existing data in the database. The database (Apple's Core Data framework) improves app startup time, and furthermore tracks which posts have been viewed or labelled with a ⭐ by the user.
The minimum required iOS version is 17.0 (which is in beta as of Jun 2023, use an older commit if you need iOS 16.0 support).
The app is available via GitHub. It is deliberately not distributed via the Apple App Store to avoid confusion. And, frankly, the app doesn’t provide provide that much functionality compared to the SwiftLee's own website: the app is partly used as a lightweight testbed to try out some programming techniques (like JSON decoding, concurrency and Core Data).
To get a local copy up and running, use GitHub’s Open with Xcode
feature,
compile and run on a simulator or physical device.
Those who prefer running git from the command line will probably manage on their own.
- Get your personal API key at rss2json.com. This involves signing up for an account with rss2json. The free
rss2json
plan should have more than enough quota to view the feed as often as you like. Please carefully save the API key code. It allows you to generate a fair amount of traffic viarss2json.com
without having to worry about traffic generated by others. - Clone the repository to your development environment:
Code
,Code
,Open with Xcode
, allow GitHub to launch Xcode, select a location for the directory, and pressClone
. - Enter your personal API key in the file
Utilities
/ApiKey.swift
Don’t forget to uncomment thelet apiKey
line of code. By default it reads:
// insert your rss2json.com API key and uncomment
// let apiKey = "thisisthespotwhereyouinsertyourownapikey"
The line is commented out because I have a second file containing my own let apiKey
line. That second file is not on GitHub.
4. You can now compile the project to install it on an actual device (you may need to deploy it again after half a year) or run the code on a device simulator in the usual way.
When you launch the app, it will list all posts on SwiftLee's site. The first time may take a few seconds.
The Search field allows you to filter the list of posts. It searches the title fields only; it does not search the post's full text or keywords.
If you click on an post's entry on the list, it will load the actual post in a browser tab. It will also mark the entry as "read" (using Core Data).
You can toggle the read/unread status by swiping the entry to the left and tapping the opened/closed envelope button.
You can mark interesting items with a star (swipe to the left). And you can remove the star rating at any time in a similar way.
- Complete the readme
- Automatically fetch older posts via extra fetch requests (at 10 posts per request)
- Add a search bar to filter the list (needed if there are hundreds of posts)
- Minor bug fixing and cleanup
- Store the posts on-device
- Keep track of which posts have been clicked on, and visualize this using the
mail
icon to the left of the title- Unread functionality: it is easy to open a post, but takes time to seriously read it.
- Button to clear the database without uninstall/install
- Ability to mark a posting with a Star (locally). For whatever reason.
- Clean up the loose ends of Core Data (various warnings in the log)
See the open issues for a full list of proposed features (and known issues).
Contributions are appreciated. If you have an idea for an improvement, you can fork the repo and create a pull request. The command line git
commands to do this (but the Xcode IDE has equivalent commands under Source Control
):
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
You can alternatively submit an issue
with a tag like ”enhancement" or “bug”
without having to do the code changes yourself.
Don't forget to give the project a star in GitHub!
Distributed under the MIT License. See LICENSE.txt
for more information.
Peter van den Hamer - [email protected]
Project Link: https://github.com/vdhamer/SwiftLeeAggregator