Background App Refresh toggles in Settings

Discussion in 'iOS 9' started by Neblinio, May 12, 2016.

  1. Neblinio macrumors member

    Neblinio

    Joined:
    Sep 27, 2007
    #1
    I understand how background execution works on iOS, but I've always wondered how Background App Refresh toggles really work in iOS Settings.

    First things first: What's needed for an App to be shown in Background App Refresh list in Settings?

    Obviously, Apps that have "fetch" present in their "UIBackgroundModes" are listed there. It makes sense. But also Apps having "remote-notification" seem to be present. Examples: PayPal (remote-notification) and Telegram Messenger (audio, remote-notification).
    Please correct me if I'm wrong or if I miss something.

    Here comes the problem: try disabling Background App Refresh for Telegram and have someone message you while the App is not running in the foreground.
    What happens? A remote push notification wakes Telegram and it downloads your message in the background.
    So what have you achieved by disabling its Background App Refresh toggle? Remember Telegram only uses "audio" and "remote-notification" background modes.
     
  2. ashindnile macrumors 6502

    Joined:
    Jul 16, 2015
    #2
    A remote push notification does not download the message in its entirety..
    And by this I mean the images sent aren't necessarily downloaded entirely for example..
    With push notifications, you get notified about particular events. Take the case of Facebook.
    You get notified if say someone comments on a post you make.
    However background app refresh downloads data and keeps your newsfeed up to date with the latest content.
    Push just sends enough data for the user to know there's something new.
    Even in push mail you'll observe that while you receive the email threads, they still have to download before you can view them.
    Hope I made sense!
     
  3. Neblinio thread starter macrumors member

    Neblinio

    Joined:
    Sep 27, 2007
    #3
    Thanks for replying and giving some good examples.
    I had already noticed the difference you highlight: remote push notifications only download basic content such as plain text.
    But one question remains: considering the example App Telegram only uses "remote-notification" and not "fetch", what's changed when you toggle Background App Refresh on/off for it? I really can't see a difference.
    (In fact, I don't even know why it's listed there)
     
  4. ashindnile macrumors 6502

    Joined:
    Jul 16, 2015
    #4
    If you've got background app refresh turned ON, incoming messages are periodically fetched and your messages will be waiting for you. When it's off you'll observe that your threads update after the app launches..
     
  5. Neblinio thread starter macrumors member

    Neblinio

    Joined:
    Sep 27, 2007
    #5
    The problem is Telegram still manages to download the messages in the background with Background App Refresh turned off.

    I've just tested it: with Telegram in a suspended state and BAR turned off, I received a message, enabled airplane mode and opened Telegram. The message was there.

    I really don't know why, but BAR toggle has no effect in this case.
     
  6. GreyOS macrumors 68030

    GreyOS

    Joined:
    Apr 12, 2012
    #7
    I reproduced this using your method but only when I had just been using Telegram. So I suspect it's still running for a little bit when backgrounded- not in a background refresh kind of way but in the old style 'you get a short while to wind down' way.

    I couldn't reproduce when it had been a while since using Telegram- messages did not appear
     
  7. GreyOS macrumors 68030

    GreyOS

    Joined:
    Apr 12, 2012
    #8
    And ashindnile gives some wrong information

    The background mode remote-notification does mean that the whole message is downloaded when the notification is received, see the table here

    https://developer.apple.com/library.../BackgroundExecution/BackgroundExecution.html

    Now I'm pretty sure that background mode is disabled by the BAR setting (so that's why telegram appears in the list). I honestly just think that Telegram is downloading the message not through that disabled background mode but because it's still partly running, as i suggested earlier?
     
  8. ashindnile macrumors 6502

    Joined:
    Jul 16, 2015
    #9
    I was talking about push mode notifications, without backgrounding. I'm sorry if that wasn't clear! :)
     
  9. bushido Suspended

    bushido

    Joined:
    Mar 26, 2008
    Location:
    Germany
    #10
    I enabled it on some apps for the first time in like two years the other day and I can't tell a difference.

    Like when I open twitter it still takes a bit to refresh, same as before. Don't see any difference on Snapchat and Instagram either. It still refreshes content only after I open the apps again.

    Probably gonna disable it again soon. See no point in it, no reason to waste battery
     
  10. ashindnile macrumors 6502

    Joined:
    Jul 16, 2015
    #11
    The refreshing is done periodically..
    Maybe that's why it wasn't up to date..
     
  11. bushido Suspended

    bushido

    Joined:
    Mar 26, 2008
    Location:
    Germany
    #12
    probably use my app too often lol
     
  12. cynics macrumors G3

    Joined:
    Jan 8, 2012
    #13
    The biggest difference I notice is with MyFitnessPal (calorie counting app). It will record steps from the phone, when I have BAR off and launch the app on my iPad those steps recorded with my iPhone won't show up until I open the app on the iPhone and let it sync the data. With BAR turned on it will sync that data (steps) from my iPhone without me doing anything.

    My best battery life I've ever had was with BAR on. I'm not saying it helped battery life just I couldn't notice any/much negative effect from using it.
     
  13. fjarl macrumors member

    Joined:
    Sep 13, 2015
    #14
    My understanding is that it could help a little bit. Most people seem to think of BAR as this evil battery hog that constantly wakes your phone to download content. But it is also pretty smart as I understand it, for example downloading stuff when another app has activated wifi, updating gps when another app accesses positional data etc. Basically getting the most out of those situations where power draining features are being used anyway. This might explain people not really seeing an improvement in battery life with BAR on.
     
  14. Neblinio thread starter macrumors member

    Neblinio

    Joined:
    Sep 27, 2007
    #15
    You're right. New messages are still downloaded for a brief amount of time, but then stop (unlike that famous competitor App now owned by Facebook, which abuses PushKit so it can never be prevented from downloading messages in the background).

    I'll have to do more tests with the help of a syslog viewer, to try to learn how much time it keeps running in the background.
     
  15. GreyOS macrumors 68030

    GreyOS

    Joined:
    Apr 12, 2012
    #16
    Ah so Pushkit is also how that other app manages to support the web client then..

    Btw how did you find out what background modes apps declare?
     
  16. Neblinio thread starter macrumors member

    Neblinio

    Joined:
    Sep 27, 2007
    #17
    It's really simple. Download the app through iTunes, open the ipa file (it's just a renamed zip file) and find info.plist
     

Share This Page