Is an iOS app misbehaving? Try this:

Sometimes an app on your iPhone, iPad or iPod touch just doesn’t seem to work right. It may be a new app that you’ve just installed, or it might be an old favorite that has suddenly started acting oddly. For example: perhaps the app just seems to shut down randomly.

It’s tempting to dismiss all such behavior as “bugs”, and blame the software developer. However, there’s a real chance that it’s not a bug causing the problem, but something up with your iDevice.

And this can be true even if most of your apps seem to be working just fine—not all apps make the same demands on the system and problems may only be obvious with apps that work the system particularly hard, such as photography apps that are processing multiple images simultaneously.

Before blaming the app, give it the best possible chance to work properly by making sure your iPhone, iPad or iPod touch is actually providing a proper, stable platform. Here’s how.

First, check that you have enough free storage, by going to Settings->General->Usage.

You may think that, because you have a device with 16 GB storage that you can store 16 GB on it, but that’s not how the technology works. If less than—as a rule of thumb—15% of your storage is available, it can cause problems for apps, especially apps that manipulate a lot of temporary data (such as, you guessed it, photography apps that are processing multiple images simultaneously).

The problem isn’t actually the amount of free space, but where it’s located—it’s randomly distributed in very small chunks, and the app can’t access big enough free areas for its needs. Clearing out data that you don’t need, as well as apps you never use, can create space that improves the performance of the apps you do use (and you can always download a deleted app again if you change your mind).

Next, do the same for your system memory. There isn’t very much of this and it can suffer from the same fragmentation problems as your storage. To do this, close down all running apps and re-start your device. Here’s how:

First, for iOS 7: go to your home screen and then double-tap on the Home button to reveal thumbnail of all your open apps:

Then, take each thumbnail and swipe it up off the screen until it’s gone:

Do this with every open app until all that you have left is the Springboard (“home screen”):

For iOS 6 and earlier, go to your home screen and then double-tap on the Home button to reveal the multi-tasking bar:

Next, tap-hold one of the app icons in the multi-tasking bar until the icons start to wobble, and display a red minus sign in the corner:

Then tap on all the minus signs to close down all the running apps, until the multi-tasking bar is completely clear.

Now it’s time to re-start your device. Press down on the power button at the top of your device until you see the message asking you to slide to power off:

Slide across to power off and wait for your device to shut down.

When it has finished shutting down, press the power button once again until you see the Apple logo, and wait for your device to start up. Now you can fire up your favorite apps again!

Even if apps aren’t misbehaving, it’s good preventative medicine to do this every so often—every week or two.

(Note: there are people who say that iOS memory can’t get fragmented, so therefore this is all unnecessary. They’re right that the system design means it shouldn’t get fragmented, but the fact of the matter is that this method works for 99% of problems that our users have encountered over the past years, so we’ll stick with something practical that works, rather than a theory that doesn’t!)

If that doesn’t work, it could be that the app installed incorrectly (which happens rarely, but can affect both new installations and updates). Try deleting the app from your iPhone and re-downloading it directly on your device (App Store->Updates->Purchased), NOT via iTunes.

Finally, always check that you are running the latest version of the the app (if you go to App Store->Updates and there’s an update available, install it).

Bugs do appear in software but—at least with responsible developers—they also get fixed. Yes, a new release can introduce new bugs, but, on the whole, apps get more stable as they evolve, with more feedback from more users helping the developers track down and eliminate more bugs.