Does your pod install taking forever?

(594 Views)


If you are an iOS developer then nobody can understand this issue better than you could. Trying to update the existing pod and seeing it stuck is one of the common problems that occur in cocoapods. Did it happen with you too? Let us find out the ways to handle this problem.

The problem

Sometimes, using pod install command in cocoapods can put you in trouble. It will take forever to run. With the help of verbose mode, you can know where it is stuck as shown in the following code.

"Updating spec repo master $ /usr/bin/git pull --no-rebase --no-commit

Before moving on to the solution, it is important to give you a hint about cocoapods if you don’t know.

What is cocoapods?

Cocoapods acts as a manager of library dependencies for your Xcode projects. It’s home to more than 69 thousand libraries. It is also a dependency manager for the Objective C or any other language running on the Objective-C runtime. It basically aims at the source-based distribution of third party code and integration into Xcode projects automatically. It runs from the command line. Moreover, its function is to installing dependencies for an application by specifying them instead of copying. These dependencies are specified in a file known as Podfile.

Solution to your Problem

There are a number of solutions to this problem. Get to know them and try one by one till your problem doesn’t get solved.

  1. By using a simple command, the problem can be solved easily. Follow the command as given
  2. pod repo remove master pod setup pod install

    or,

    pod install --verbose --no-repo-update
  3. To find out what is going on and what is leading the pod install to remain stuck, try running
  4. pod install --verbose
  5. To get deeper info on why it is stuck at something shown below, you need to get the size of the git repo that you are cloning.
  6. -> Installing Typhoon (2.2.1) > GitHub download > Creating cache git repo (~/Library/Caches/CocoaPods/GitHub/0363445acc1ed036ea1f162b4d8d143134f53b92) > Cloning to Pods folder $ /usr/bin/git clone https://github.com/typhoon-framework/Typhoon.git ~/Library/Caches/CocoaPods/GitHub/0363445acc1ed036ea1f162b4d8d143134f53b92 --mirror Cloning into bare repository '~/Library/Caches/CocoaPods/GitHub/0363445acc1ed036ea1f162b4d8d143134f53b92'

    Use the command

    /repos/:user/:repo
  7. Try to update cocoapods to solve the issue. Firstly, open the terminal and type:

    $ sudo gem update cocoapods
  8. . If the problem hasn’t gone away, you can try deleting and installing pods again. It’s a little bit challenging to remove pods files from your project. Try to do it manually by following the given steps:
  • From the Build Phased, remove the pods record marked in red.
  • Does your pod install taking forever?
  • In the Framework folder, remove libPods.a
  • Does your pod install taking forever?
  • Move to the project directory and delete Podfile.lock*, **Pods folder and Workspace. You must delete them from the trash folder too.
  • Install and use CocoaPods De-integrate and run it.
  • $ [sudo] gem install cocoapods-deintegrate
  • Run,
  • $ pod deintegrate
  • Change the location of your directory
  • $ cd yourprojectdirectory
  • Edit the profile as needed and add the required lines
  • $ open -a Xcode podfile
  • Or, you can write this command:
  • $ nano podfile
  • At last, run this command to reinstall the pod.
  • $ pod install

Cocoapods help you in building amazing projects. All the solutions mentioned in this article is working to solve your problem of "pods install take forever".

Solution Worked 0 UpvotesUpvote

        

Solution Didn't Worked 0 DownvotesDownvote



Comments



Get Programming Help
Search

Play 2048 Game Online


Search Tags