XKCD Reader 2.0 Complete, Awaiting Review!
November 3, 2012 | Category: Cool Stuff, iPhone, Programming
Good news everyone!
XKCD Reader 2.0 is now awaiting review at Apple. It was briefly rejected earlier this week due to one of the new features taking up too much space in the iCloud backups, but I fixed that and resubmitted the application, so hopefully soon it’ll go back into review and then get published!
So, what’s new? Well, pretty much everything. I basically rewrote the application from the ground-up, and changed how things look and work on the inside.
Front-End (User Interface) Updates
The interface has been totally redesigned on the iPhone/iPod and iPad, with support for the new iPod Touch and iPhone 5’s longer screen.
The comics are displayed in a nice list, with a scroll index on the side (like the Contacts or Music apps).
The image viewer has been revamped to make use of the entire screen from the get-go. Images are zoomable and moveable, allowing for easy reading of text or taking in the”big picture” of some of the larger comments.
The viewing panes on both the iPhone and iPad show the comic’s title, image, and mouseover text. The grey box that holds the text is easily hide-able with a simple tap to the screen; tapping the screen again brings the mouseover text back.
Back-End Updates
The whole code-flow has been redone to make the logic more…Well, logical. Things are pretty well self-contained, isolating logic to only the places it needs to be. The upshot of this is adding new features and maintaining current code should now be easier! Everyone loves easier code maintenance đ
One of the biggest changes I made was to store the comics in a database on the device. That’s right, EVERYTHING about the comic, including the image, is in a database file that the application accesses based on which comic you choose. The only Internet connectivity the app needs is for the periodic check to see if there are new comics to be downloaded. If there aren’t any updates, you don’t see anything. If the app detects there are comics more recent than it’s “current” comic (assuming it has an internet connection), it will prompt you to download them or do it later. The download takes the comic’s information (title, number, and mouseover text), as well as the image (which is converted to a base-64 encoded string), and stores them in the database. The downside of this is the app is significantly larger than the previous version; XKCD Reader 1.5 was only a few hundred kilobytes, whereas XKCD Reader 2.0 is around 100 megabytes.
I made the database change mostly to cut down on the amount of network activity my app produced, but also to learn about how iOS handles files and how to interface with a database through Objective-C. Storing the image itself was an afterthought (originally the image would have to be downloaded every time), but I decided to see if I could get the image in the database purely for fun. When it worked, I decided to make that the new database format and wound up with what I have now.
The database itself was pre-populated using a Python script I wrote. The most current comic at the time of submission was #1124, “Law of Drama“. Gotta give a shoutout to JetBrains and their PyCharm IDE for Python here; it makes Python development a breeze, even for a script as small as this one. However, because of the amount of time it takes to get an app reviewed for publishing, the database WILL be out of date as soon as it’s downloaded, and will prompt the user for an update on the first run (as of this writing there have been 5 additional comics). That’s unfortunately not something I can control; it’s up to Apple to get the app under review and ultimately they control how long it waits for the review and how long the review takes.
Upcoming Features(?)
The biggest thing I’d like to implement is a way for users to store their favorite comics. Now that I’ve changed the UI and moved to a database, this actually shouldn’t be that hard, and probably could have been included in this release if I had wanted to take the time. This release was more about getting the new UI, icon, and backend code out there, though. Now that it is, favorites will be the next feature I work on.
I’d also like to add a way to search the comics. I’m not entirely sure of the feasibility of this yet, but I’m looking into the possibility.
That’s it for XKCD Reader 2.0! Hopefully soon I’ll be able to post again and tell you all that the app is going live, but as of right now I don’t know how long it’ll take. Check back often to see when the update goes live! Until next time đ
Tags: database, iOS, iPad, iPhone, program, programming, XCode, XKCD, xkcd reader, xkcdreader
No Comments