Adding Google_analytics for iOS is not working tried many ways?

后端 未结 4 1159
星月不相逢
星月不相逢 2021-01-12 03:06

Hi I\'m getting following error and so far not able to fix it.

Undefined symbols for architecture x86_64: \"_OBJC_CLASS_$_GAI\", referenced from:
  objc-clas         


        
4条回答
  •  半阙折子戏
    2021-01-12 03:51

    For me the problem is solved by the following steps:

    pod init
    

    Open Podfile paste the following lines(Change the Projectname to your project name)

    # Uncomment the next line to define a global platform for your project
    platform :ios, '9.0'
    
    target 'Projectname' do
      # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
      use_frameworks!
    
    
      # Pods for Projectname
      pod 'GoogleAnalytics'
    
      target 'ProjectnameTests' do
        inherit! :search_paths
        # Pods for testing
      end
    
      target 'ProjectnameTests' do
        inherit! :search_paths
        # Pods for testing
      end
    
    end
    

提交回复
热议问题