Posts for 'Development'


The State of iComics – Jan 2014

January 29, 2014 •

Since it’s been a fair few months since I’ve put out a new update for my little comic reader app project, I thought I’d quickly do an update on what stage it’s at.

At the moment, I’m aiming for finishing iComics version 1.1 (Shiny new picture above).
Some of the major features I plan to have in version 1.1 include:

Continue reading

Disabling Timer Coalescing in OS X Mavericks

January 25, 2014 •

If you’re an iOS developer, and you’re still developing apps that support iOS versions below iOS 7 (Like I am), then you might have noticed after upgrading to OS X Mavericks that the iOS 6 Simulator runs absolutely terribly. EVERY single animation in there runs at an incredibly choppy frame-rate, which makes most kinds of app testing relatively useless.

Today, I learnt from a little birdie that the reason for this issue is due to the new Timer Coalescing feature, introduced in Mavericks:

In OS X Mavericks, Timer Coalescing groups low-level operations together, creating tiny periods of idle time that allow your CPU to enter a low-power state more often. With its activity reduced up to 72 per cent, the CPU uses less energy, giving your battery a break too. This happens so fast you won’t notice a thing. And your Mac still gets just as much done just as quickly.

Apple – OS X Mavericks – Advanced Technologies (January 2014)

It would seem to make sense that as a result of Timer Coalescing, the timers that power the iOS 6 Simulator animations are getting coalesced themselves, and this is resulting in the strange behaviour (Curiously enough, the iOS 7 Simulator is fine though!).

In any case, apparently there is a console command that lets you disable Timer Coalescing across the system:

Continue reading

The Talking Pokédex App

October 4, 2013 •

Back when I was working on iPokédex, I had a pretty lofty, outrageous end-goal for the project: to get it to replicate the experience of a Pokédex from the TV show as closely as possible. Given the device on the TV show was a complete fantasy device in the year of 1998, I found the concept of owning a device with the remote possibility of realising that in 2008 incredibly exciting.

That being said, there was one aspect of a functioning Pokédex on iOS that was never quite possible for me to implement: the ability to synthesis audible speech.

Now, iPhone and iPad have had built-in speech capabilities since as early as iOS 3.0 (Well, iPhoneOS 3.o back then) . At that point, it was mainly used for accessibility purposes (So people with poor eyesight could interact with the devices), but it became way more exposed when Apple brought out Siri in iOS 5.

Unfortunately, the speech synthesis API has always been a private one, meaning it’s not normally possible to use it without a small bit of hacking, and even still, if an app containing it was submitted to the App Store, it would instantly get rejected by the automatic submission process.

Nevertheless, I had a play with this private API back in 2011 to see what it could theoretically be capable of.

Continue reading

iComics is one year old!

October 1, 2013 •

Blimey, I’d been so busy working on iComics these past few days that this completely slipped my mind!

On the morning of September 25, 2012, Apple approved version 1.0 of iComics and made it visible on the App Store. iComics has now been officially available to the public for over a year. Holy crap, that was fast. XD

If I am able to reflect on iComics and its development right now, all I have to say is this: this project has been hard. Bloody hard. Possibly the hardest one I’ve undertaken yet. For something you’d think as simple as opening up an archive file of images and rendering them to the screen, it’s actually WAY complex than what I was ever anticipating when I first opened the project in November 2011.

The app is a constant psychological battle with the user to try to distract them from noticing any load times, at the same time, being a technological battle of co-ordinating multiple concurrent threads, ensuring the next set of pages is ready to go… hopefully without some kind of conflict crashing the app. If anything, this has made me appreciate all of the other comic reader apps on the App Store as well, as they would have all gone through the same thing.

Ultimately, when it came to the design and feature-set of iComics, I’ve ended up pretty much choosing the hard route for every design challenge I’ve faced. I’ve written pages of custom UI code for a tailored look and feel, I’ve re-implemented Apple code from later versions of iOS so it’s backward compatible down to iOS 5 (So I can PROUDLY say that iComics supports ALL iPad models 😀 ), and I’ve spent months developing a multi-threaded algorithm that can cache pages of a comic, simultaneously as the user is reading through it. For each of these things, there was always an easier solution, but I firmly believed that by taking the time and effort to perfect each of them (well… getting them to stop crashing), iComics will have become a great app that users will feel is better than the rest. 🙂

On the App Store, I couldn’t be more happy with the current ratings of iComics. It’s more or less 4.5 – 5 stars in most countries, with many glowing reviews. In any case, simply knowing that I made an app that most people agreed wasn’t a complete waste of their money is enough to put me over the moon. XD

At this point, however, iComics is absolutely no where near finished. While I was really hoping to implement collections quickly, I spent the majority of this year tracking down critical bug reports users were reporting (Mainly involving certain comics loading pages incorrectly, corrupted RAR files, and solid archives breaking) and having what new features I’ve added ruin the threading algorithm again. And on top of that, trying to work out a new design for iComics after Apple dropped iOS 7 on us. XD

In any case, while I can’t promise when the next version of iComics will drop, I can definitely promise that I will not give up until iComics is the most awesome DRM-free reader on the App Store.

Thank you very much to all of iComics’ users! I’m glad you’re enjoying it!

iPokédex. Now one year.

July 15, 2012 •

Hey everyone.

I almost missed this, but thankfully I was somehow reminded of it last Friday.

As of the instant this blog post was published, iPokédex has officially been offline for precisely a year now. Wow. That was fast.

I thought I’d just quickly say, thanks again for all of the support everyone has given me. It was thanks to all of this kind feedback that made me think it was something worth pursuing.
(Also, even though it’s taken down, please stop asking for an Android version! XD)

I can’t really say anything for certain right now, but thanks to my trip to GDC earlier this year, iPokédex making a comeback isn’t fully off the table at this point. And as such, I haven’t given up. 🙂

However, there’s nothing I can do about it in the immediate present, so right now, I’m continuing my work with iComics. 🙂

In any case, fingers are still crossed! Don’t give up hope! 🙂

Zooming to a point in UIScrollView

January 14, 2012 •

(Updated March 2015) I’ve rewritten the code for zooming to a CGPoint in a UIScrollView to be even better in a new blog post. Go check it out!

If there’s one piece of functionality that has become basically boilerplate on iOS, it’s the concept of double-tapping a zoomable UIScrollView to quickly zoom in on a given point. When I was writing the code for displaying pages in iComics, I assumed that this would be a really simple thing to do. I mean, surely all you’d need is a UITapGestureRecognizer attached to a UIScrollView that passes the location of any double-taps to the scroll view… right?

Nope. XD

Turns out that although there is a UIScrollView method called ‘zoomToRect‘ (which lets you zoom to a specific CGRect region of a UIScrollView), out-of-the-box, there is no official way to procedurally zoom into a specific CGPoint. This actually surprised me greatly since I would have thought it would be a standard part of UIKit.

In any case, I did a bit of searching around on Google, looking for some code that would let me do this easily. I found a few bits of code here and there, however they were written in such a way that unless the minimum and maximum scales of the scroll view were set up in a specific way (Uh, which in iComics’ case, they weren’t), the zooming wouldn’t work properly at all.

So, cutting to the chase, I decided to just roll my own category for UIScrollView to add that functionality to it. All it does is take a CGPoint (relative to the bounds of the scroll view itself) and a scale, and translates those to a CGRect that can then be passed to UIScrollView’s drawToRect method. 🙂

Continue reading