Question about updating data from background.

ArturMalendowiczArturMalendowicz USMember ✭✭
edited June 2015 in Xamarin.iOS

Hey guys. I am developing application that has to connect to specified API in specified time(for example every each minute). Is there any possibility to achieve this with iOS? I was looking for some solutions and have a bit of questions:

-How often does Today Widget get's updated?
-How to force iOS to run background fetch more often(do I need to run app constantly or to restart it so it gets its algorithm updated?)

Thanks in advance :)

Best Answer


  • adamkempadamkemp USInsider, Developer Group Leader mod

    You can't do that. Background app refresh is not guaranteed to run at any particular interval, and you're explicitly not allowed to just run code in the background to refresh something from a server. Your requirements, as stated, are not possible on iOS.

    So the question then is why do you think those are requirements? What is it that your app is needing to refresh, and why must it be refreshed every minute regardless of whether the user is looking at it?

  • ArturMalendowiczArturMalendowicz USMember ✭✭

    Well, I have NDA on that project so can't tell exactly what, but it has to check for new data as it's required for person who will use it. Probably I will have to use push notification, but the backend is really old and was created for Windows Mobile 6.5 ;)

  • ArturMalendowiczArturMalendowicz USMember ✭✭

    The app will be used only by specialized people as work device, so I can't be hated ;)
    Thanks for answering, I will let my leader know that we also need new backend or at least some proxy between.

  • adamkempadamkemp USInsider, Developer Group Leader mod

    The app will be used only by specialized people as work device, so I can't be hated ;)

    Ha, that's what you think! Trust me, bespoke apps for internal use only can still cause people to hate you if their batteries start draining due to poor coding. Maybe if these devices are tethered you would be ok.

    FWIW, if your app doesn't go into the app store then the rules don't necessarily apply, and you can cheat in all kinds of ways. I still don't recommend it, though.

  • ArturMalendowiczArturMalendowicz USMember ✭✭

    Probably it will go as it will be sold as SAAS and will be branded from backend, so I have to pass Apple's review ;<

Sign In or Register to comment.