xcode - Error installing google analytics on iOS app -


i trying integrate google analytics project, , surprised requires cocoapods install google analytics now.

i followed documentation here:

https://developers.google.com/analytics/devguides/collection/ios/v3/?hl=en

i called pod init on terminal, , i've edited podfile to

# uncomment line define global platform project  # platform :ios, '6.0'    target 'unity-iphone'  pod 'google/analytics', '~> 1.0.0'  end    target 'unity-iphone tests'    end

and following error on terminal when call pod install.

updating local specs repositories analyzing dependencies [!] unable find specification google/analytics (~> 1.0.0)

[!] cocoapods not able update master repo. if unexpected issue , persists can inspect running pod repo update --verbose

it did not generate .xcworkspace file.

how can fix issue?

edit:

i tried answer steffen setup master repo again, , error now.

analyzing dependencies [!] unable satisfy following requirements:

  • google/analytics (~> 1.0.0) required podfile

although podfile still contains pod 'google/analytics', '~> 1.0.0'

i had problem on os x el capitan version 10.11.5

  1. open terminal command prompt
  2. path xcode project folder

    $ cd /path/to/xcode/myproject/ 
  3. create podfile using command

    $ pod init 
  4. add line pod 'google/analytics' generated podfile
     # uncomment line define global platform project      # platform :ios, '8.0'      # uncomment line if you're using swift      # use_frameworks!       target 'myproject'       pod 'google/analytics'      end 
  1. try install pod fails

    $ pod install -bash: pod: command not found 
  2. try install cocoapods fails

    $ sudo gem install cocoapods  error:  error installing cocoapods: activesupport requires ruby version >= 2.2.2. 
  3. you need install activesupport lets install cocoapods okay pod install fails new bug

    $ sudo gem install activesupport -v 4.2.6 $ sudo gem install cocoapods $ pod install [!] unable find specification 'google/analytics' 
  4. perform these last steps , pod install succeed

    $ pod repo remove master $ pod setup $ pod install 

nb of these command line actions take long time complete , terminal gives no indication doing anything, appears broken working quietly therefore needs patience.

so sad still have resort command line in 2016


Comments

Popular posts from this blog

1111. appearing after print sequence - php -

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

node.js - Express and Redis - If session exists for this user, don't allow access -