调用 stopUpdatingLocation 后,位置指示符在状态栏上仍然存在,但仅适用于旧的 Bundle Identifier [英] Location indicator persists on status bar after stopUpdatingLocation is called, but only for old Bundle Identifier

查看:16
本文介绍了调用 stopUpdatingLocation 后,位置指示符在状态栏上仍然存在,但仅适用于旧的 Bundle Identifier的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有谁知道为什么某些捆绑标识符与其他捆绑标识符的位置指示器保持不变?我正在使用安装在运行版本 5.0.1 的 iOS 设备上的 Apple 示例 LocateMe 应用程序.当我使用旧的包标识符时,在调用 CLLocationManager stopUpdatingLocation 之后,位置指示器会停留在状态栏上.

Does any one know why the location indicator stay on for certain bundle identifer vs. the others? I am using an Apple sample LocateMe app, installed on my iOS device running version 5.0.1. When I'm using an old bundle identifier, the location indicator stays on the status bar, after the CLLocationManager stopUpdatingLocation is being call.

但是,当我使用相同的应用程序时,唯一的区别是新的捆绑 ID,应用程序按预期工作,并且一旦调用 stopUpdatingLocation,位置指示器就会消失.

But, when I'm using the same exact app, with the only difference being a new bundle id, the app works as expected and the location indicator disappear once the stopUpdatingLocation is being called.

有没有人遇到过这个问题或者可以解释一下?

Did anyone experience this problem or can explain it?

推荐答案

我终于想到,如果我从设置中重置位置警告,错误就会消失.

I finally figured that if I reset the Location Warnings from the Settings, the bug disappear.

从您的 iOS 设置中选择常规 |重置 |重置位置警告.这会将警告重置到所有应用程序.这意味着下次您启动需要位置的应用程序时,iOS 将通过位置权限对话框提示您.从操作表中选择重置警告".

From your iOS Settings select General | Reset | Reset Location Warnings. This will reset the warning to all the apps. This mean that the next time you start an app that requires location, the iOS will prompt you with the location permission dialog. Select 'Reset Warnings' from the action sheet.

再次运行应用程序时,iOS 将通过位置权限对话框提示您(如果没有 - 重复上述过程以重置位置警告).选择是"后,应用程序会按预期运行,并且位置指示器会在几秒钟后消失.

When running the app again, the iOS will prompts you with the location permission dialog (if it doesn't - repeat the process above to reset the location warnings). After selecting yes, the app behaves as expected, and the location indicator disappears after few seconds.

这篇关于调用 stopUpdatingLocation 后,位置指示符在状态栏上仍然存在,但仅适用于旧的 Bundle Identifier的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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