What's new

What Can an App Do in the Background? (1 Viewer)

Johnny Angell

Played With Dinosaurs Member
Senior HTF Member
Deceased Member
Joined
Dec 13, 1998
Messages
14,905
Location
Central Arkansas
Real Name
Johnny Angell
I use MyMovies Pro to catalog my discs. I use my iphone to scan the bar code of the disc and I’m done. Except for the version I have on my iPad Pro. The way the app keeps the ipad in sync is to download my entire data base of discs, which takes close to 10 minutes.

What is bad about that is the app has to remain in the foreground. If I bring up another app or close the ipad, the download stops. That’s rather inconvenient. I wrote the developer via support request and within 2 hours I had a reply. He said apple requires that only small things be done in background and downloading my dB of movies is not a small thing.

Well apple violates that with their App Store and doing app updates which can take a long time. Of course, he who makes the rules can violate them when they want. However, I don’t buy the developer’s answer. Something like this is made for the background.

I will go on to say that I love the app and will continue using it. That 2 hour response time is typical, and is often faster. Props to the developer.

Are there apps that do heavy duty work in the background?
 

DaveF

Moderator
Senior HTF Member
Joined
Mar 4, 2001
Messages
28,772
Location
Catfisch Cinema
Real Name
Dave
Im not current. But for a while, there was a 99 second limit on background processing of tasks in iOS. I've not checked to see what the current situation is. I know that Overcast, my podcast app of choice downloads in the background fine. I can toggle in and out of Audible and it downloads books as I do that.

But for apps doing big things, like syncing my media library, I just leave them to their business. Similarly to Netflix or Amazon downloading videos, I let them do it in the foreground to avoid problems. I don't know how much is real and how much is Cargo Cult behavior on my part. :)
 

DaveF

Moderator
Senior HTF Member
Joined
Mar 4, 2001
Messages
28,772
Location
Catfisch Cinema
Real Name
Dave
Thanks for the reply. I’ve not heard that expression before, what does it mean?

“Cargo cult science is a phrase describing practices that have the semblance of being scientific, but do not in fact follow the scientific method.”
https://en.m.wikipedia.org/wiki/Cargo_cult_science

Doing a thing that has the structure or form of effective and technical process, but doesn’t actually accomplish what’s desired, is another way to think of it.

I think people constantly killing all their apps immediately after using them is similar to this sort of personal gadget cargo cult behavior. :)
 

Thomas Newton

Senior HTF Member
Joined
Jun 16, 1999
Messages
2,303
Real Name
Thomas Newton
I wrote the developer via support request and within 2 hours I had a reply. He said apple requires that only small things be done in background and downloading my dB of movies is not a small thing.

Well apple violates that with their App Store and doing app updates which can take a long time. Of course, he who makes the rules can violate them when they want. However, I don’t buy the developer’s answer.

It looks to me as if the developer is familiar with at least some of Apple's guidelines:

"The current state of your app determines what it can and cannot do at any time. For example, a foreground app has the user’s attention, so it has priority over system resources, including the CPU. By contrast, a background app must do as little work as possible, and preferably nothing, because it is offscreen."

https://developer.apple.com/documentation/uikit/app_and_environment/managing_your_app_s_life_cycle

There are also guidelines regarding fetching content "opportunistically" in the background; additional guidelines that are probably more to your liking:

https://developer.apple.com/documen...updating_your_app_with_background_app_refresh

I believe these say that the third-party app could download the database of movies in the background, if it did so in small chunks, being careful not to interfere too much with the performance of the foreground application. The app would need to gracefully handle being killed in the middle of a background download, and restarted later. After all, when iOS runs out of memory, it doesn't page to "compressed RAM" or disk. It asks running apps to give back some memory, and if it doesn't get enough, it kills them until it gets what it needs.
 

Johnny Angell

Played With Dinosaurs Member
Senior HTF Member
Deceased Member
Joined
Dec 13, 1998
Messages
14,905
Location
Central Arkansas
Real Name
Johnny Angell
It looks to me as if the developer is familiar with at least some of Apple's guidelines:

"The current state of your app determines what it can and cannot do at any time. For example, a foreground app has the user’s attention, so it has priority over system resources, including the CPU. By contrast, a background app must do as little work as possible, and preferably nothing, because it is offscreen."

https://developer.apple.com/documentation/uikit/app_and_environment/managing_your_app_s_life_cycle

There are also guidelines regarding fetching content "opportunistically" in the background; additional guidelines that are probably more to your liking:

https://developer.apple.com/documen...updating_your_app_with_background_app_refresh

I believe these say that the third-party app could download the database of movies in the background, if it did so in small chunks, being careful not to interfere too much with the performance of the foreground application. The app would need to gracefully handle being killed in the middle of a background download, and restarted later. After all, when iOS runs out of memory, it doesn't page to "compressed RAM" or disk. It asks running apps to give back some memory, and if it doesn't get enough, it kills them until it gets what it needs.
Well, if I use another app, Movies Pro stops the download but doesn’t lose what it has done. Same if I close my ipad. Seems he could do this in the background also.
 

DaveF

Moderator
Senior HTF Member
Joined
Mar 4, 2001
Messages
28,772
Location
Catfisch Cinema
Real Name
Dave
Maybe? I don't really understand the current abilities and limitations of background downloading. It seems Overcast downloads stuff i the background pretty well. But 50MB podcasts take about a minute or less (over wifi). I've not tested Audible to see where it breaks in the 5-10 minute book download (they're hundreds of MB typically). And when I download videos, I'm often queuing 1GB to 2GB of downloads that will take 10 to 30 minutes, so I leave the iPad on and Netflix downloading while I do other stuff to ensure it gets done.

Here's some more info about background app downloading. A takeaway is the explicit example is about transferring 500 kB of data, small stuff like a weather app might do.
https://developer.apple.com/documen...ng_system/downloading_files_in_the_background

There's also the difficulty and money required for a small developer to add new features to their app. These movie database apps are very niche, I assume (I use MovieBuddy+), so the developer has to be extra judicious in focusing on key features that serves the most users and help bring in new users.

So email him about background downloads. Add your voice to the feature request. You might not be the only one and might prompt them to explore and improve the syncing features. :)
 

Users who are viewing this thread

Sign up for our newsletter

and receive essential news, curated deals, and much more







You will only receive emails from us. We will never sell or distribute your email address to third party companies at any time.

Forum statistics

Threads
357,059
Messages
5,129,835
Members
144,281
Latest member
papill6n
Recent bookmarks
0
Top