Code Code - 6 months ago 33
Swift Question

How to remove library installed with CocoaPods?

I'm trying to fully remove a library I installed using CocoaPods.

I've removed the entry from my Podfile and called

pod install
from the terminal.

All the library files seems to be deleted but I can still do
import myLibrary
in my iOS Swift project without any build errors.

Why is this so?


In order to completely remove the imports from a previously built project try to clean it first:

In Xcode:

K ( or Product > Clean )

This should clear the compiled code from within the projects release or debug directory:

/Library/Developer/Xcode/DerivedData/<Project>/Build/(Release or Debug)

The compiler will often try to use code that it's already compiled during the build process if it can.