4

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?

Josh
  • 1,031
  • 2
  • 19
  • 31
  • 2
    Have you clean the project and [clear all its derived data](http://stackoverflow.com/questions/7279141/how-can-i-safely-delete-in-my-library-developer-xcode-deriveddata-directory)? – Code Different Jun 24 '16 at 18:37
  • I was unaware this happend. I need to check my projects now. – Sethmr Jun 24 '16 at 18:37
  • remove dependencies (pods) from build settings. delete pod folder from your project. Remove pod lines for the frameworks or repositories you wanna remove and rerun pod update. – Muhammad Adnan Jun 24 '16 at 18:41
  • Code Different, you were right. I cleared the derived data and did a hard clean and now I am no longer able to reference those deleted libraries. – Josh Jun 24 '16 at 18:54
  • 1
    possible duplicate of [question](http://stackoverflow.com/questions/16427421/how-to-remove-cocoapods-from-a-project) – gokhanakkurt Jun 30 '16 at 22:43
  • 1
    Possible duplicate of [How to remove CocoaPods from a project?](https://stackoverflow.com/questions/16427421/how-to-remove-cocoapods-from-a-project) – Paul Beusterien Sep 01 '17 at 20:58

3 Answers3

1

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.

Tarvo Mäesepp
  • 4,477
  • 3
  • 44
  • 92
  • Thanks, Tarvo. I had done this and ran pod install yet it was still letting me use those methods. A complete delete of derived data and a hard clean seemed to fix my problem. – Josh Jun 24 '16 at 19:24
  • No problem. At least your problem is fixed now. But for me it helped everytime :) – Tarvo Mäesepp Jun 24 '16 at 19:27
1

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.

Josh
  • 1,031
  • 2
  • 19
  • 31
0

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.

Volodymyr
  • 1,165
  • 5
  • 16