无法识别分析

Analytics not recognized

一直在关注 Firebase 设置 guide。设置过程有效,但我的项目无法识别 Analytics 类型:

Analytics.logEvent // use of unresolved identifier 'Analytics'

Xcode 自动完成显示 AnalyticsConfiguration,但没有别的。作为健全性检查,以下是我为设置项目所做的工作:

  1. 使用cocoapods获取Firebase/Core
  2. 确保我使用的是 .xcworkspace 文件
  3. 为我的项目添加了 GoogleService-Info.plist
  4. 在我的应用委托中,导入 Firebase 并调用 FirebaseApp.configure()

意识到问题所在。我的项目名称是 "Analytics",它以某种方式影响了名为 "Analytics".

的框架的可见性