开发者

Getting iPhone location from a remote server

How does a remote server trigger an iPhone app to get current location? Apps that help locate your stolen/lost iPhone seem to be able to do this.

How is this possible? Does it use some kind of stealth push notification? Also, the phone app would have to update the remote server of its location, which means it will nee开发者_开发问答d to use the NSURLConnection features while backgrounded or terminated. Seems like magic to me.


No. That's not possible. It's always the device (iPhone) that reports its current location.

If Find My iPhone does it, it's probably running some special background application to report its location on a regular basis, or when the server requests it (through push notifications). But it's always the phone sending its location information.


An application on your phone can subscribe to a push service. When the push is sent to the phone, it can send it's location to a server.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜