Can iphone app woken in background for significant location change do network activity?

后端 未结 2 1300
小蘑菇
小蘑菇 2020-12-08 03:00

I\'m working on an app that monitors significant location changes in the background. I\'ve been reading all the answers (well, I think all!) about ios4 and the application l

2条回答
  •  南笙
    南笙 (楼主)
    2020-12-08 03:46

    Yep. You can do your network processing based on significant change events.

    When you get woken up into the background state on significant change (from terminated or suspended state), you can make your http request. If you find your app is being terminated before you finish your HTTP request, you can ask for additional background processing time via the beginBackgroundTaskWithExpirationHandler: method on UIApplication.

    I spent a fair bit of time on short train trips to test this out. :)

提交回复
热议问题