2
votes

After updating cocoapods to 0.39.0 from 0.38.2 each time I run pod install or pod update command, I receive error

[!] Unable to satisfy the following requirements:

- `GoogleAnalytics (= 3.13)` required by `Podfile`

Project info: XCode 7, iOS9 SDK, 8.0 Deployment target, bitecode is disabled in project settings.

Podfile:

platform :ios, '8.0'

pod 'AFNetworking', '2.6.0'
pod 'Typhoon'
pod 'SSKeychain'
pod 'JBWebViewController', :git => 'https://github.com/Ponf/JBWebViewController', :commit => '19d15604a694e7436fa4934a5bf221f05360eb8c'
pod 'TTTAttributedLabel'
pod 'HockeySDK', '3.6.4'
pod 'GoogleAnalytics', '3.13'
pod 'Intercom'
pod 'FBSDKCoreKit'
pod 'OpenSans'
pod 'UIButton+Activity'
pod 'HexColors'
pod 'AFNetworkActivityLogger'
pod 'HCSStarRatingView', :git => 'https://github.com/hugocampossousa/HCSStarRatingView.git'
pod 'LGSideMenuController', '~> 1.0.0'
pod 'DateTools'
pod 'SDWebImage'

If I remove dependency on 3.13 for Google Analytics - pod update fails on another pod.

After I have fallback to Cocoapods 0.38.2 - pod update starts working well.

How to make 0.39.0 working? Thanks!

Edit: It looks like there is some problem in Cocoapods Core: https://github.com/CocoaPods/CocoaPods/issues/4365

2
see this link may be helps you stackoverflow.com/questions/27633798/… - Anbu.Karthik
@Anbu.Karthik thanks, I have tried clean install after removing Podfile.lock, /Pods folder and *.workspace file and still have same problem. - Ponf
check once your 'GoogleAnalytics', '3.13' is supported in platform :ios, '8.0' or platform :ios, '9.0' - Anbu.Karthik

2 Answers

1
votes

I think you need to update the latest version of Google Analytics, you just remove the version number and install the pod.

In Xcode 7 it may require the latest version.

To find below for more clarifications

You just follow the below terminal commands. While your going to update your pods you just focus on the below terminal commands.These commands are more than enough for update your pods. Hope it may help you.

Open the Terminal:

$sudo gem update —system
$sudo gem uninstall cocoapods
$sudo gem install cocoapods
$pod setup
$cd <project path>
$pod init
$ open -a Xcode Podfile

add files(framework name) into to your pod file. Example:

platform :ios, '7.0'

pod 'FBSDKLoginKit'
pod 'FBSDKCoreKit'
pod 'FBSDKShareKit'
pod 'FBAudienceNetwork'
pod 'FBSDKMessengerShareKit'
Save your pod file. then,

$pod install
$pod update(if you need)

The frameworks will be download the latest version, if we are not mentioning the version name. Ex:

pod 'AFNetworking'

Open your project folder --> Open the project workspace not the xcode project.

Clean the Project.

Run the Project.

Hope it will useful for you.!

1
votes

So, the problem is in 0.39.0 version of Cocoapods. In this build were some changes in pods version comparison, so if you have dependences on concrete version it may be broken.

EDIT: Now the issue is tracked here: https://github.com/CocoaPods/CocoaPods/issues/4365

There's a fix available but not in an official release yet. To try out the fix manually:

  1. Make clone of Cocoapods repository.
  2. In Gemfile replace

    cp_gem 'cocoapods_core' with

    gem 'cocoapods-core', :git => 'https://github.com/CocoaPods/Core.git', :branch => 'master'

  3. run bundle install.

I hope it will help someone :)