且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

推送通知 - 后台进程 - iPhone

更新时间:2023-02-27 08:44:05

推送通知无法实现您希望进行的那种后台处理.

The sort of background processing you're looking to do is not possible with push notification.

推送通知允许您通知用户某事.例如,当用户在 Twitter 上收到直接消息时,Twitter 客户端会发送通知.

Push notification allows you to notify the user of something. An example would be a Twitter client that sends a notification when the user receives a direct message on Twitter.

当应用未运行时,推送通知无法对 iPhone 上发生的事情做出反应.相反,这取决于您是否拥有一台服务器来确定何时发送通知,然后再发送.

Push notification can not react to things happening on the iPhone when the app is not running. Instead, it depends on you having a server that determines when to send a notification and then sends one.

我认为您的应用程序不需要进行后台处理.如果您存储用户的初始位置,下次加载应用程序时,您可以获取他们的位置并计算两者之间的距离.如果您正在寻找路线,除非您像 Loopt 刚刚那样与 AT&T 达成交易.

I'm not seeing any need for background processing in your application. If you store the user's initial location, the next time the app loads you can get their location and calculate the distance between the two. If you're looking for the route travelled, you're out of luck unless you make a deal with AT&T like Loopt just did.