IOS Location Awareness Programming
Can I send the user location to 开发者_如何学运维the server even if the app has exit ?
Yes you can.
You can use background location
- significant location change (iPhone 3Gs and iPhone 4)
- region monitoring (iPhone 4 only)
- 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.
精彩评论