Solving 'circular loop' problems in iPhone apps

15.01.2010
It started as an annoying symptom in one of my iPhone apps. It eventually led down a rabbit hole of "what if" scenarios and what to do about them.

The app in question was , an overall . After you select to display a document from GoodReader's initial list of files, a set of controls overlays the screen. The controls include a Back button, needed to return to the file list. After a few seconds, the overlay fades--so that you have an unobstructed full-screen view of the document. To get the overlay to reappear, you tap on the screen.

The problem I had was that, with certain documents (especially PDFs), a tap did not get the overlay to reappear. Making matters worse, GoodReader was set to automatically open where it last left off. This meant that, if I quit and relaunched GoodReader, it immediately returned to the problem document (without any overlay). There seemed no exit from this circular loop, no way to regain access to GoodReader's file listings.

It turns out that the folks at Goodiware had wisely anticipated just this sort of dilemma. So they put in a back door exit. The solution is to quit GoodReader and go instead to the iPhone's Settings app. From here, scroll down to and select the GoodReader item. Here you'll see a way to turn off the "Reopen last file" option. Do so. Now, when you next launch GoodReader, it will no longer jump to the problem document, remaining at the file list instead. Success!

This is a fine work-around but it still leaves a number of unanswered questions: