News for hackers. Stuff that matters.
Re:Android vendors, don’t kill my app by sudhirj on Monday January 14, 2019 @04:18AM (#18901751)
And yeah, the permissions model in Android vs Apple is different, but multi tasking in particular feels the same. i.e. Apple has fine grained permissions on demand for contacts, microphone, camera, location, etc, and requires that all apps gracefully degrade when permissions is denied.

But for multitasking there isn’t really any fine grained permissions - as long as the app is doing a whitelisted task in the background, no user permission is required. I think Apple does check that background APIs are not misused as part of the review process, though - I don’t think you could implement a tracking socket masquerading as a background download, for instace.

Re:Android vendors, don’t kill my app by simonh on Monday January 14, 2019 @04:39AM (#18901843)
As I understand it, on iOS third part apps don’t actually do any tasks in the background, most such services are actually implemented by platform services provided by Apple that the third part apps request or subscribe to. So for example apps request an Apple service to do a background download on their behalf. Or the app subscribes to a notification feed that wakes it up when triggered to handle the notification, but the app doesn't do a download or wait for notifications itself.

Very often on iOS when you see a notification 'from an app' or something in the background is completed 'by an app', in fact the app didn't do any of it. This means fine grained permissions for background processing aren't really an issue on iOS, because such behavior is managed and guaranteed by Apple. It only matters when there's a security or privacy implication.

This is why background activities came so much later to iOS, because Apple had to very carefully think through and implement all the background services apps would require in an efficient and secure way.

EDIT: To be clear there are some exceptions but I'm not sure exactly what they are.

Re:Android vendors, don’t kill my app by tinus_hn on Monday January 14, 2019 @07:03AM (#18902400)
For some basic use cases, like notifications and downloads, there is a special system or api that allows your app to do that in the background without actually running.

If you want to play audio or track gps in the background you need to do things yourself though.

Re:Android vendors, don’t kill my app by simonh on Monday January 14, 2019 @07:55AM (#18902595)
OK, hence the Facebook issue where they played a silent audio track to keep their app active. I'd forgotten about that, thanks.
Re:Android vendors, don’t kill my app by vxNsr on Monday January 14, 2019 @02:38PM (#18905754)
Wow, that sucks is again super user hostile, I'm so happy I removed their app.
Re:Android vendors, don’t kill my app by scarface74 on Monday January 14, 2019 @06:17AM (#18902199)
Technically, you could have an app that plays silent audio in the background to keep from getting killed and then do something else, but that would get flagged by the review process.

But, if I recall correctly, VLC will continue a background file transfer session from its built in web server on iOS if you play a movie in the background. Otherwise it will be killed after 10 minutes.

Re:Android vendors, don’t kill my app by doubleunplussed on Monday January 14, 2019 @12:34PM (#18904658)
I think they've wisened up to that trick. My girlfriend and I use a guided meditation app that has long silences in the audio. If the screen is off, her phone kills the app after about thirty seconds of silence, making the app practically useless.

I was going to report a bug to the app suggesting they include some ultrasonic or subsonic audio to defeat this mechanism, but it's just an arms race at that point. The phone will start looking at the total power in the audible spectrum to decide whether to kill the app or something.

This kind of thing is infuriating and prevents apps from doing anything outside of the box, stifling innovation and making users frustrated.

Re:Android vendors, don’t kill my app by aaaaaaaaaab on Monday January 14, 2019 @04:56AM (#18901918)
>I don’t think you could implement a tracking socket masquerading as a background download

The Facebook app used to play a silent audio track to stay active in the background, until they got called out: https://www.reddit.com/r/iphone/comments/3opxhm/facebook_app...

Re:Android vendors, don’t kill my app by toyg on Monday January 14, 2019 @05:07AM (#18901957)
Holy crap, I didn’t know that. Yet another reason I was right to uninstall the app and just use the website.