My application uses the core location also after the application terminates with the method startMonitoringSignificantLocationChanges in CLLocationManager class.
我的应用程序也在应用程序终止后使用CLLocationManager类中的方法startMonitoringSignificantLocationChanges来使用核心位置。
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 5和6中的位置键启动: - (BOOL)应用程序:application didFinishLaunchingWithOptions:launchOptions;在AppDelegate类中,一切运行良好。
But in iOS-7 betas the application doesn't launch with a location key after a significant location change.
但是在iOS-7测试版中,应用程序在重要位置更改后不会使用位置键启动。
Has anybody encountered this problem?
有人遇到过这个问题吗?
I tried it on a simulator and in the device.
我在模拟器和设备上试了一下。
Thanks for the help.
谢谢您的帮助。
1 个解决方案
#1
5
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.
当应用程序被用户从应用程序切换器终止时,我的应用程序中存在同样的问题。但是如果由于内存不足或其他原因被OS终止,它确实会使用位置密钥启动。
It is the expected result from iOS7 unfortunately. An official apple response I got from one of their evangelists:
不幸的是,它是iOS7的预期结果。我从他们的一位福音传道者得到的官方苹果回应:
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.
如果用户在应用切换器中向上滑动,则操作系统将不会启动应用,除非用户明确告知此操作。所以不,SLC不会启动应用程序,也不会发出静音通知。此时将启动应用程序的唯一事情是用户点击图标。这里的意图是用户已表示他们选择不再出于任何原因运行该应用程序,因此我们尊重这一点。在这种情况下,你真的无能为力。下次用户启动应用程序时,您可以让他们知道某些数据可能会丢失,尽管您实际上无法确定是否缺少数据(即您可能已在后台被操作系统杀死,并且用户可能没有移动因此没有触发任何SLC通知)。我的建议是在操作系统的策略中收集你可以获得的数据,如果用户手动杀死了应用程序,那么就尊重这个愿望而不做任何事情。无论如何,如果行为的这种变化最终导致您的问题或(特别是)您的用户混淆,请随时提交错误报告。
Attach link to Apple DEV forums: https://devforums.apple.com/message/882691#882691
附上Apple DEV论坛的链接:https://devforums.apple.com/message/882691#882691
#1
5
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.
当应用程序被用户从应用程序切换器终止时,我的应用程序中存在同样的问题。但是如果由于内存不足或其他原因被OS终止,它确实会使用位置密钥启动。
It is the expected result from iOS7 unfortunately. An official apple response I got from one of their evangelists:
不幸的是,它是iOS7的预期结果。我从他们的一位福音传道者得到的官方苹果回应:
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.
如果用户在应用切换器中向上滑动,则操作系统将不会启动应用,除非用户明确告知此操作。所以不,SLC不会启动应用程序,也不会发出静音通知。此时将启动应用程序的唯一事情是用户点击图标。这里的意图是用户已表示他们选择不再出于任何原因运行该应用程序,因此我们尊重这一点。在这种情况下,你真的无能为力。下次用户启动应用程序时,您可以让他们知道某些数据可能会丢失,尽管您实际上无法确定是否缺少数据(即您可能已在后台被操作系统杀死,并且用户可能没有移动因此没有触发任何SLC通知)。我的建议是在操作系统的策略中收集你可以获得的数据,如果用户手动杀死了应用程序,那么就尊重这个愿望而不做任何事情。无论如何,如果行为的这种变化最终导致您的问题或(特别是)您的用户混淆,请随时提交错误报告。
Attach link to Apple DEV forums: https://devforums.apple.com/message/882691#882691
附上Apple DEV论坛的链接:https://devforums.apple.com/message/882691#882691