ios7中的重大blocation更改事件 - 后台服务调用 [英] Significant blocation change event in ios7 - Background service call

查看:157
本文介绍了ios7中的重大blocation更改事件 - 后台服务调用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的应用中使用重要的位置服务。
如果我的应用程序被系统杀死或用户强行关闭,使用重要位置更改服务事件我将位置数据发送到我的服务器,在iOS 6中。
在iOS6中,我的应用程序在强制后将数据发送到服务器也关闭。
但是在iOS 7中我没有得到这个重要的位置更改事件。

I am using Significant location services in my app. If my app killed by system or force close by user, using event of Significant location change services I am sending location data to my server,in iOS 6. In iOS6 my app sends data to server after force close also. But in iOS 7 I am not getting this significant location change event.

推荐答案

因为iOS 7 SDK不在NDA了,为了完成,我在这里发布答案。正如答案中所述:监控区域但是当应用被杀时,位置图标会消失 如果用户在应用切换器中杀死了应用,则iOS 7不允许在后台进行重大位置更改。

As iOS 7 SDK is not under NDA anymore, I'm posting the answer here, for the sake of completion. As mentioned in answers here: Monitoring regions but location icon disappears when app is killed iOS 7 does not allow significant location changes in background, if user has killed the application in app switcher.

有关 Apple论坛的更多信息,其中还包含以下回复: Apple代表:

More information on Apple forums, which also contains the following reply from Apple representative:


如果用户在应用程序切换器中刷新,那么除非明确告知,否则操作系统不会启动应用程序
由用户这样做。所以不,SLC将不会启动应用程序,也不会启动静音通知。在此时启动应用程序的唯一
事情是用户点击
图标。这里的意图是用户已经表达了他们的选择
,因为任何原因不再运行该应用程序,因此我们尊重
。在这种情况下,你真的无能为力。
下次用户启动应用程序时你可以让他们知道某些
的数据可能会丢失,尽管你真的无法判断
是否缺少数据(即你可能有在后台被OS
杀死,用户可能没有移动因此没有
触发任何SLC通知)。我的建议是在操作系统的策略中收集
的数据,如果用户有
手动杀死应用程序,那么尊重这个愿望并且什么也不做。
无论如何,如果
行为的这种变化最终导致您或(特别是)您的用户混淆
,请随时提交错误报告。

If a user swipes up in the app switcher then the OS will not launch the app unless explicitly told to do so by the user. So no, SLC will not be launching the app, nor will silent notifications. The only thing that will launch the app at that point is the user tapping the icon. The intention here is that the user has expressed their choice of not having that app running any more for any reason, so we honor that. In this situation, there's really nothing that you can do. The next time the user launches the app you can let them know that some of the data may be missing, although you really cannot tell whether there's missing data or not (i.e. you might have been killed by the OS in the background and the user may not have moved thereby not triggering any SLC notifications). My suggestion would be to gather the data you can within the policies of the OS and if the user has manually killed the app then respect that wish and don't do anything. By all means, feel free to file a bug report if this change in behavior winds up causing problems for you or (especially) confusion for your users.

这篇关于ios7中的重大blocation更改事件 - 后台服务调用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆