Search code examples
iosstreamdownloadios-universal-app

iOS: Best way to handle file downloads in my universal application


In my universal application I am receiving a video list from a server. I create a folder structure out of this information and display it in a split view controller. So in the end there are folders that can either contain subfolders or videos. The user should be able to stream and in some cases download the video.

Now to my question: How should I handle the file download if the user accesses another video or folder? Should I keep it running in the background or is it better to pause the download? What would be the way to go?

Thanks in advance


Solution

  • User intent is your guide here, in a limited UI mobile environment if the user discards a view by moving to another view, in general any IO associated with the discarded view should be at a minimum paused, but most likely discarded.

    The reason for this is that mobile applications do not generally offer a concurrent UI experience to the user. Its a primarily modal driven UX with some background processing.

    Assuming that you can let a user stack up lengthy network operations is letting the user potentially deadhead your app, and reduces responsiveness.

    Async is fine and dandy as it has to be but stacking up pending IO for streaming downloads in a mobile application is not imo a rational design decision due to the limitations of the device and the smaller focus of the user in what is essentially a modal UX.