Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove or uninstall library previously added : cocoapods

I added an external framework via cocoapods into my iOS application. How can i remove that library from the project?

like image 382
Lithu T.V Avatar asked Dec 06 '12 19:12

Lithu T.V


People also ask

How do I delete a library from pod?

Just rm -rf that pod's folder, and remove the line from the Podfile. Then run pod install again.

Can you delete Podfile?

If you want to remove a Pod, edit Podfile, delete the Pod you want, and rerun pod install .


2 Answers

Remove lib from Podfile, then pod install again.

like image 68
fannheyward Avatar answered Sep 22 '22 13:09

fannheyward


The unwanted side effects of simple folder delete or installing over existing installation have been removed by a script written by Kyle Fuller - deintegrate and here is the proper workflow:

  1. Install clean:

    sudo gem install cocoapods-clean 
  2. Run deintegrate in the folder of the project:

    pod deintegrate 
  3. Clean (this tool is no longer available):

    pod clean 
  4. Modify your podfile (delete the lines with the pods you don't want to use anymore) and run:

    pod install 

Done.

like image 24
Michal Avatar answered Sep 24 '22 13:09

Michal