gpt4 book ai didi

iphone - 监视区域但位置图标在应用程序被杀死时消失

转载 作者:行者123 更新时间:2023-11-29 10:54:21 24 4
gpt4 key购买 nike

我有一个 CLLocationManager 包含在一个 singleton 中,我添加了大约十几个区域来监控。当应用程序处于前台/后台时,我已成功收到越界通知。但是,当我强行退出应用程序时,位置图标消失了,我没有收到任何回调。

最佳答案

据我所知,这是 iOS7 的预期功能。这是我找到的对类似问题的回复,在本例中涉及重大位置更改:https://devforums.apple.com/message/882691#882691 :

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.

关于iphone - 监视区域但位置图标在应用程序被杀死时消失,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19081570/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com