Bug in Videos.app Doesn't Clear Cached Data for Streamed TV Shows and Movies

If you’ve had problems with your iOS device frequently running out of disk space and you stream lots of video using Videos.app, you’ve probably encountered this bug without knowing it.

TV shows and movies purchased via iTunes can be “streamed” to your iPhone or iPad. From what I can tell, however, Videos.app’s implementation of this feature is not truly streaming those purchases. The content is not served in the same way that Apple recommends for third-party apps (HTTP Live Streaming). Instead, videos are downloaded in full (or at least very high) quality while the user watches them.

One way I can tell that videos are not streamed with HTTP Live Streaming is that videos never downgrade to a lower playback quality under poor network conditions. They simply fail to play. Videos.app also silently disables the streaming feature when the device is not connected to a Wi-Fi network.

If I stream enough video, I notice that an enormous amount of disk space steadily disappears without a trace. I verify this via the Usage screen in my device’s Settings.app. Strangely, one signal that the bug has taken hold of my device is I start to see “No Data” reported for these three apps:

Music, Photos, and Videos falsely reporting “No Data.”.

It’s only by the total available size listed at the top of the Usage screen that I can tell how much disk space is actually being consumed.

After streaming lots of video in Videos.app, if I expand the full list of apps in this Usage screen and total all their used disk space, I find that there’s as much as 5 to 10 gigabytes of “dark matter” data unaccounted for – assuming, for the sake of diagnosis, that those three “No Data” values are valid (which they aren’t).

Hang on, this bug gets even weirder.

This bug has been present in iOS 7 since the first betas through at least version 7.1.1 The odd thing is that during the beta period, it was possible to delete cached videos by swiping right-to-left across a table view cell in Videos.app. There was no visual affordance for this. I discovered it by accident. After performing the delete gesture on all streamed videos, the Usage screen in Settings.app reported a correct amount of free disk space.

But hang on, this gets even weirder still.

You could only perform the delete gesture on cells for videos which you had streamed. Cells for videos you didn’t watch at all would not respond to the gesture. Since there was no visual difference between the two, the only way I could clean up after watching a season of The Sopranos was to try swiping to delete on every single cell in the table view. Ugh.

And weirder.

The publicly-available versions of iOS 7 disabled the swipe to delete feature for streamed content. I assumed – incorrectly – that the feature was removed because cached video content was being automatically removed from disk. This turns out not to be the case, as I have discovered tonight. This means that the developers of Videos.app removed the only way to delete cached video, seemingly without replacing it with any other cache-clearing strategy. Maybe it’s just an oversight, but either way it’s frustrating.

As of tonight, the only way I’ve found to delete cached Videos.app content is to sign out of my Home Sharing account in Setting.app’s “Videos” screen, launching Videos.app, then signing back into Home Sharing again. When I followed those steps tonight on my iPad, 7.5 gigabytes of free disk space reappeared. I had not downloaded any videos. I only used the streaming feature.

A side note for all iOS developers: if your app has an on-disk cache, please provide a simple mechanism for users to manually clear the cache. I also discovered a similar bug in Dropbox.app tonight. There was 3.5 gigabytes of cached data being stored on disk by Dropbox, without any way to clear it except to delete and reinstall the app.

If you use Unread, you can clear the on-disk image cache at the bottom of Unread’s settings screen.

  1. I haven’t had a chance to test 7.1.1 yet. 

|  25 Apr 2014