导入FirebaseAnalytics模块而不是Firebase

时间:2021-10-02 04:47:20

I was working on Google Analytics and google said that I need to install Firebase to handle Google Analytics actions.

我正在做谷歌分析,谷歌说我需要安装Firebase来处理谷歌分析操作。

I installed Firebase through Cocoapods and imported property list(.plist) file that firebase.google.com supplied.

我通过Cocoapods和firebase.google.com提供的导入属性列表(.plist)文件安装了Firebase。

But when I try to import Firebase module by import Firebase Xcode says there is no such module and auto-complete advises import FirebaseAnalytics.

但是当我试图通过导入Firebase Xcode来导入Firebase模块时,我说没有这样的模块,自动补全建议导入FirebaseAnalytics。

If I use FirebaseAnalytics module I got the error shown below. I looked through this question, but none of the answers solved my problem.

如果我使用FirebaseAnalytics模块,我会得到如下所示的错误。我看了看这个问题,但没有一个答案能解决我的问题。

Podfile:

Podfile:

# Uncomment this line to define a global platform for your project
 platform :ios, '8.0'


target 'MyApp do
  # Comment this line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!
  # Pods for MyApp
    pod 'Firebase/Core'

  target 'MyAppTests' do
    pod 'Firebase/Core'
    inherit! :search_paths
    # Pods for testing
  end

  target 'MyAppUITests' do
    inherit! :search_paths
    # Pods for testing
  end

end

导入FirebaseAnalytics模块而不是Firebase

1 个解决方案

#1


1  

Try cleaning up your derived data folder. (See this article for help.) Also, removing the pod and adding it back again might help. :)

尝试清理您的派生数据文件夹。(请参阅本文。)此外,移除豆荚并重新添加它可能会有所帮助。:)

BTW: Did you implement FIRApp.configure() in AppDelegate.swift?

顺便问一句:你在AppDelegate.swift中实现了FIRApp.configure()吗?

#1


1  

Try cleaning up your derived data folder. (See this article for help.) Also, removing the pod and adding it back again might help. :)

尝试清理您的派生数据文件夹。(请参阅本文。)此外,移除豆荚并重新添加它可能会有所帮助。:)

BTW: Did you implement FIRApp.configure() in AppDelegate.swift?

顺便问一句:你在AppDelegate.swift中实现了FIRApp.configure()吗?