cocoapods - 'pod install' takes forever

前端 未结 20 1199
面向向阳花
面向向阳花 2020-11-27 09:20

I was trying to update the existing pods with the pod install command, but it takes forever to run.

The verbose mode shows it was stuck at the following

相关标签:
20条回答
  • 2020-11-27 09:29

    I had the same problem, I then realized that I was still running Network Conditioner on "Very Bad Network". Turning that off solved the issue.

    Hope that helps someone.

    0 讨论(0)
  • 2020-11-27 09:32

    Updated answer for 2019 - the cocoa pods team moved to using their own CDN which solves this issue, which was due to GitHub rate limiting, as described here: https://blog.cocoapods.org/CocoaPods-1.7.2/

    TL;DR You need to change the source line in your Podfile to this:

    source 'https://cdn.cocoapods.org/'
    
    0 讨论(0)
  • 2020-11-27 09:32

    Even I was thinking the same. If you open Activity Monitor you can see that it is downloading something at there on the name of GIT.

    I found this tip useful.

    https://stackoverflow.com/a/21916507/563735

    0 讨论(0)
  • 2020-11-27 09:32

    After a half of the day of investigating why Analyzing Dependencies takes forever, I found out that I was installing the latest Firebase pod (7.1.0), which relies on GoogleAppMeasurement version 7.1.0, and there was another pod, which is an ad mediation framework, which includes Google-Mobile-Ads-SDK. This SDK was relying on a much lower version of GoogleAppMeasurement ~ 6.0. I was able to install the pods by commenting out the conflicting pod from the ad mediation. Something like this:

    # Ad network framework
      pod 'SomeMediationNetwork/Core'
    #  pod 'SomeMediationNetwork/GoogleMobileAds' # - the conflicting pod
      pod 'SomeMediationNetwork/Facebook'
      pod 'SomeMediationNetwork/SmartAdServer'
      pod 'SomeMediationNetwork/Mopub'
    

    I had to contact the ad mediation library publisher to fix this issue, most probably by updating to the latest Google-Mobile-Ads-SDK pod and releasing a new version.

    I hope this one helps some other folks who are banging their head

    0 讨论(0)
  • 2020-11-27 09:35

    Sometimes happen to me too and I simply:

    pod clean
    pod update --verbose
    
    0 讨论(0)
  • 2020-11-27 09:35

    Solution for me in 11.2019

    Hello i tried a lot of things, but nothing worked. Try just to connect to this site https://cdn.cocoapods.org/ if you can't so just use VPN and do pod install etc. And don't forget to use --verbose for understanding what's happening.

    0 讨论(0)
提交回复
热议问题