Pergunta

I create news app that parses social network and get information from it. I saw in Apple documentation in Background Execution and Multitasking that Long-Running Background Tasks can be applied by

Apps that need to download and process new content regularly Apps that receive regular updates from external accessories

So, can I use it to update my apps news as Long-Running Background Tasks?

Foi útil?

Solução

Why do you need those background updates? Neither Twitter nor Facebook use those to update the user's feed. You might need them for things like updating user location and showing notifications (just like Foursquare does) but it is quite a battery-darining experience some time.

While you certainly can use them for whatever you want it might not save from an AppStore rejection.

Outras dicas

Use iOS 7 background fetch - http://www.doubleencore.com/2013/09/ios-7-background-fetch/.

It will poll your server, fetch the new items, then if there is any difference toward local content, schedule a simple local notification - https://developer.apple.com/library/ios/documentation/iphone/Reference/UILocalNotification_Class/Reference/Reference.html.

It won't drain battery, you neither have to implement push notification services, however, user will experience as a push notification.

As everyone suggested, the actual news should be fetched in foreground, at every app launch actually. Only some counters, states should be fetched in the background, not the actual content.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top