开发者

IOS Location Awareness Programming

开发者 https://www.devze.com 2023-02-28 21:08 出处:网络
Can I send the user location to 开发者_如何学运维the server even if the app has exit ?Yes you can.

Can I send the user location to 开发者_如何学运维the server even if the app has exit ?


Yes you can.

You can use background location

  1. significant location change (iPhone 3Gs and iPhone 4)
  2. region monitoring (iPhone 4 only)
  3. continuous location change (iPhone 4 only)

Any of the above will work, but you should probably avoid (3) because it will then be making very frequent requests to the same. That'll just kill your battery.

You can try to use TaskCompletion API to send information to server because app is still in background state.


If the app is not running, of course you can't send anything.

0

精彩评论

暂无评论...
验证码 换一张
取 消