应用程序没有一个显著位置改变后的位置键启动 [英] Application doesn't launch with location key after a significant location change

查看:106
本文介绍了应用程序没有一个显著位置改变后的位置键启动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序使用的核心位置也应用在CLLocationManager类中的方法startMonitoringSignificantLocationChanges终止后。

My application uses the core location also after the application terminates with the method startMonitoringSignificantLocationChanges in CLLocationManager class.

我的应用程序启动,在该方法中的iOS 5的位置键和6:
- (BOOL)应用:应用didFinishLaunchingWithOptions:launchOptions;
在AppDelegate类,一切运作良好。

My application launches with a location key in iOS 5 and 6 in the method: - (BOOL) application:application didFinishLaunchingWithOptions:launchOptions; in AppDelegate class and everything works well.

但在iOS的7测试版应用程序不具有显著位置改变后的位置关键推出。

But in iOS-7 betas the application doesn't launch with a location key after a significant location change.

有没有人遇到过这个问题?

Has anybody encountered this problem?

我试图在模拟器和设备。

I tried it on a simulator and in the device.

感谢您的帮助。

推荐答案

我在我的应用程序同样的问题,当应用程序被用户从应用程序切换终止。
但它确实具有关键位置启动,如果它是由操作系统的内存不足或其他原因终止。

I have the same problem in my app, when the app was terminated by user from app switcher. But it does launch with location key if it was terminated by OS for low memory or other reason.

距离iOS7遗憾的是预期的结果。

It is the expected result from iOS7 unfortunately. An official apple response I got from one of their evangelists:

如果用户在应用程序切换器挥笔了那么操作系统不会启动
  该应用除非明确告知用户这样做。所以,不,SLC将
  无法启动应用程序,也不会沉默的通知。唯一的
  将在该点启动应用程序的事情是用户敲击
  图标。这里的意图是该用户已前pressed自己选择
  不具有应用程序以任何理由任何更多的运行,因此我们的荣誉
  那。在这种情况下,没什么好说的,你可以做。该
  旁边的用户启动应用程序时,你可以让他们知道一些
  该数据可能丢失,但你真的无法判断
  有数据缺失或不(即你可能已经被杀害了OS
  在后台,并且用户可能没有从而移动不
  触发任何SLC通知)。我的建议是收集
  数据你可以在OS的政策内,且用户有
  手动杀死然后应用程序尊重这一愿望,没有做任何事情。
  通过一切手段,随意文件,如果这种变化中的错误报告
  行为缠造成的问题,为您或(尤其是)混乱
  为您的用户。

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.

附加链接到苹果开发论坛:
<一href=\"https://devforums.apple.com/message/882691#882691\">https://devforums.apple.com/message/882691#882691

Attach link to Apple DEV forums: https://devforums.apple.com/message/882691#882691

这篇关于应用程序没有一个显著位置改变后的位置键启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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