cocoapods - 'pod install' takes forever

前端 未结 20 1201
面向向阳花
面向向阳花 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:53

    As pointed out here git-remote-http process running in background. I goto this process from Activity Monitor and quitting this process resumed the pod process which was stuck on "Updating local specs repositories" after POD INSTALL

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

    As mentioned in other answers, It takes forever because the size of cocoapods master repo is huge. This time can be reduced using the following steps.

    1) Create a private specs file path on your github repository. Provide this path https://github.com/yourpathForspecs.git' as a source in your podfile.

    2) identify ALL the repositories You need and their dependencies( mentioned in the podspec.json file on cocoapods for these repositories) and get their podspec.json files from cocoapods. add these podspec.json files with their folder ( say the latest version folder for bolts) in this specs repository.

    3) remove the source 'https://github.com/CocoaPods/Specs.git' in the podfile

    4) pod update

    This will take significantly less time as this requires fetching and downloading just the pods you need instead of whole cocoapods repository. In My case it reduced the pod update time from 15-20 mins on average to 3-4 mins at most.

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