代码之家  ›  专栏  ›  技术社区  ›  Dheeraj D

获取未解析标识符'Analytics'Firebase Analytics的使用

  •  0
  • Dheeraj D  · 技术社区  · 5 年前

    我集成了谷歌的firebase分析,我成功地在Console上创建了一个应用程序。

    我已按照链接整合: https://firebase.google.com/docs/analytics/get-started?platform=ios

    • 使用xcode 11.3创建了iOS应用程序

    • 添加以下豆荚:

      // Uncomment the next line to define a global platform for your project
      
      platform :ios, '12.0'
      
      target 'FirebaseAnalytics' do
      
      //Comment the next line if you don't want to use dynamic frameworks
      
      use_frameworks!
      
      inhibit_all_warnings!
      
      Analytics
      pod 'Firebase/Core'
      pod 'Firebase/Analytics'
      pod 'Firebase/Performance'
      pod 'Firebase/Crashlytics'
      
       #Pods for FirebaseAnalytics
      
      end
      
    • 在didfishlaunchingwithoptions中FirebaseApp.configure文件()

    到目前为止,所有看起来血淋淋,但我得到下面的错误,而登录一个事件

     Analytics.logEvent("go_premium", parameters: [
                       "name": "Go premium" as NSObject,
                       "text": "click_on_go_premium_button" as NSObject
                       ])
    

    未解析标识符“Analytics”的使用

    enter image description here

    0 回复  |  直到 5 年前