Josh
Josh

Reputation: 1089

How to completely remove cocoa pods from project?

I have a project that had 3 cocoa pods installed. I decided I only need one of them, so I removed the other 2. I removed the two associated lines from my pod file and then ran pod install from the command line. It ran OK and said that removing the two cocoa pods was successful.

Yet when I go into my project, I am still able to import the libraries from those pods. I am still able to run functions specific to those pods. I have scoured my project and all of its files and I can't find any files related to those 2 pods, so how is it that function calls to those pods are still working? How do I actually get rid of these cocoa pods?

Upvotes: 4

Views: 6828

Answers (3)

Josh
Josh

Reputation: 1089

I was able to fix this by clearing the derived data and then doing a hard clean.

To clear derived data:

  1. Select your Xcode project and go to Preferences.
  2. In the Preferences Menu, select Location. Click on Arrow at trailing end of derived data.
  3. The folder opens. Select all projects in DerivedData and move to trash.

To perform a hard clean: Press Shift-Alt-Cmd-K

Once I did these steps, function calls to the removed cocoa pod libraries ceased to work.

Upvotes: 1

Tarvo Mäesepp
Tarvo Mäesepp

Reputation: 4533

You can open the "podfile" and remove those pod lines and from terminal go and do the pod install and it will remove pods you just removed from the "podfile". For example remove line pod "TextFieldEffects".

Here you remove the higlighted line. enter image description here

It will keep only the ones you kept in the "podfile" and removes everything else.

Upvotes: 1

Volodymyr
Volodymyr

Reputation: 1205

Check Pods folder that exists in your project folder. If there exists this deleted libraries, than delete them, if not - than they are deleted from pods.

Upvotes: 0

Related Questions