Location update even when app is killed/terminated

后端 未结 1 1320
长发绾君心
长发绾君心 2020-12-15 13:00

I am trying to get location updates even in all states, even when app is killed/terminated/suspended. I have enabled background fetch in xcode and implemented the following

相关标签:
1条回答
  • 2020-12-15 13:35

    Check this tutorial: http://mobileoop.com/getting-location-updates-for-ios-7-and-8-when-the-app-is-killedterminatedsuspended

    And the source code here: https://github.com/voyage11/GettingLocationWhenSuspended

    Hope you will get your answer. It's working for me. Now I am trying to make a http request when 'didUpdateLocations' function being called, so that I can store user current location in server when the app is not running(Suspended/terminated/killed).

    I don't think apple allowed to make any http request when the app is suspended/terminated. But if server received the request of location update, then I am good to go with that. Because I don't need response back from server. Need a lot of testing....

    0 讨论(0)
提交回复
热议问题