【发布时间】:2018-01-03 09:21:19
【问题描述】:
一直在关注 Firebase 设置 guide。设置过程有效,但我的项目无法识别 Analytics 类型:
Analytics.logEvent // use of unresolved identifier 'Analytics'
Xcode 自动完成显示 AnalyticsConfiguration,但没有别的。作为健全性检查,这是我设置项目时所做的:
- 使用 cocoapods 获取
Firebase/Core - 确保我使用的是
.xcworkspace文件 - 为我的项目添加了
GoogleService-Info.plist - 在我的应用委托中,导入
Firebase并调用FirebaseApp.configure()
【问题讨论】:
-
尝试在模块中导入?
标签: ios swift firebase firebase-analytics