ios - 新的firebase框架将不允许谷歌地图用户授权显示

标签 ios swift google-maps firebase firebase-analytics

目前,firebase 不允许我的应用显示用户授权。 userAuthorization 将打开一秒钟,然后消失。在日志中,它看起来在分析启用出现后消失了。

这是我当前的代码

import UIKit
import GoogleMaps

    class practiceViewController: UIViewController,GMSMapViewDelegate,CLLocationManagerDelegate {
    override func viewDidLoad() {
        super.viewDidLoad()

        let locationManager = CLLocationManager()
        locationManager.requestAlwaysAuthorization()
    }
}

有办法关闭分析吗?

最佳答案

您可以按照步骤打开 Debug模式并提供控制台日志吗?这是 website 的引用:

To view this event in the Xcode debug console, enable Analytics debugging:

In Xcode, select Product > Scheme > Edit scheme... Select Run from the left menu. Select the Arguments tab. In the Arguments Passed On Launch section, add -FIRAnalyticsDebugEnabled.

有 3 种方法可以禁用 Analytics。您可以在 Info.plist 上使用标志,或在运行时在 website 上设置它。 。请让我知道哪种方式适合您。

  1. If you wish to temporarily disable Analytics collection, such as to get end-user consent before collecting data, you can set the value of FIREBASE_ANALYTICS_ENABLED to NO in your app's Info.plist file.
  2. If you need to suspend collection again for any reason, you can call setAnalyticsCollectionEnabled:FALSE and collection is suspended until you re-enable it. (Turn off at run time)
  3. If you need to deactivate Analytics collection permanently in a version of your app, set FIREBASE_ANALYTICS_COLLECTION_DEACTIVATED to YES in your app's Info.plist file.

关于ios - 新的firebase框架将不允许谷歌地图用户授权显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37378606/

相关文章:

ios - 如何防止用户名在 Firebase 中重复注册?

iphone - resignFirstResponder 出现后续处理问题(键盘在 iPhone 5 上被阻止或崩溃)

ios - swift中的无限长度数组

android - 如何在单击时在单独的警报对话框中缩放 map fragment

javascript - 循环遍历 JSON 键以添加 Google map 数据

ios - iOS 中的后台获取和后台传输以在后台下载数据 (JSON)

ios - NSJSONSerialization将\n添加到JSON字符串的开头和结尾

ios - TableView 不返回数据

ios - 如何维护最初通过 CocoaPods 安装但后来手动修改的 iOS 框架?

放大时Android MapView覆盖消失