gpt4 book ai didi

ios - 定位服务 : 'Blue Bar' during 'Always' Mode

转载 作者:搜寻专家 更新时间:2023-10-31 22:24:26 24 4
gpt4 key购买 nike

到目前为止,就我所看到/搜索和实现的而言。当用户授予“始终”使用位置服务时,不应出现蓝色远景。但是我的一位客户在他的 iOS 12 手机上出现蓝条。谷歌地图应用程序也发生在他身上,但我无法在我的设备上复制它。

蓝色条消息说:“Google map 正在积极使用您的位置”

请问有没有其他原因导致出现蓝条?


弹出警报:

根据 Tawk 先生和 Roee 先生的回答,我想知道如果将 showsBackgroundLocationIndicator 设置为 true 是否会显示蓝色条,然后弹出窗口alert 也会显示给用户?说:“ABC 应用正在后台访问您的位置。”如下所示,如此处所述:About privacy and Location Services in iOS 8 and later

background location use alert

最佳答案

我会确保用户真的给了应用程序“始终授权”,并且您没有设置标志 showsBackgroundLocationIndicator。

有关此内容的 Apple 文档:

Starting with iOS 11, apps have more control over the appearance of the Location Services Status Bar (Blue Bar) for their apps.

Apps which are given When-in-use authorization by the users (regardless of the authorization asked for), will automatically get the Blue Bar displayed. Apps cannot opt out of the Blue Bar if they are only given When-in-use authorization by the users.

Apps which are given Always authorization, on the other hand, will get the Blue Bar displayed based on a new property of the CLLocationManager object.

@property(assign, nonatomic) BOOL showsBackgroundLocationIndicator;

Apps which have their Continuous Background Location session active, and have obtained Always authorization the Blue Bar will be shown only when the showsBackgroundLocationIndicator property is YES.

An app can toggle the showsBackgroundLocationIndicator property to change the visibility of the blue bar at any time.

在那些链接:

  1. https://developer.apple.com/library/archive/qa/qa1965/_index.html
  2. https://developer.apple.com/documentation/corelocation/cllocationmanager/2923541-showsbackgroundlocationindicator

编辑: 关于新问题 - 弹出警告:

您的应用程序应该请求用户允许使用定位服务 request permission

始终/同时使用该应用程序。如果用户同意始终允许,iOS 可能会提醒他该应用可以使用他的位置。

看这部分

Other apps will ask for access to your location even when the app isn't in use. When you allow an app to always use your location, iOS will remind you which apps are able to use your location after an app uses your location in the background.

https://support.apple.com/en-il/HT203033

这通常会发生一次,请参阅 Apple 在其论坛上对问题的回答:

A few days after the app obtains the "always" authorization and starts using location services in the background, the user will be asked to confirm once again that they still want this app to track their location in the background.

There is no developer action that can be taken to avoid this confirmation if the app is obtaining users' location in the background.

还有这个线程 Removing the background location alerts in iOS?

关于ios - 定位服务 : 'Blue Bar' during 'Always' Mode,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53635302/

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