21

anyone know how to remove one of the cocoa pods plugin from Xcode project ? For example, I have installed afnetworking and nyximagekit in my project. Now, I want to remove nyximagekit but keep afnetwoking. How to do that ?

sureshprasanna70
  • 1,043
  • 1
  • 10
  • 27
vic3ai
  • 279
  • 1
  • 2
  • 10
  • 2
    Removing a single pod without updating all other pods, see the `pod install --no-repo-update` answer here: https://stackoverflow.com/a/50265655/78336 – neoneye Nov 23 '18 at 12:29

4 Answers4

48

Remove the pod from your podfile, then run pod install again.

palme
  • 2,499
  • 2
  • 21
  • 38
  • 1
    Oh and please user the search function ;) The same question was asked before: http://stackoverflow.com/a/13759016/1195661 – palme Jul 28 '15 at 09:55
  • 2
    Wish I could mark your answer as the correct one @palme. I had to read the accepted answer 2-3 times just to get what it was saying. Good grief. thanks for the short, concise and _correct_ answer. :) – thephatp May 24 '16 at 04:01
  • 3
    This should be the correct answer. "pod update" is used to update all pods to latest version while "pod install" is used to add or remove pods either from the initial pod setup or to update pod additions and removals. See https://guides.cocoapods.org/using/pod-install-vs-update.html for details. – Vee Jan 10 '17 at 17:43
  • This did not work. It's still in the podfile.lock and project compiles despite library being removed. The hassle of using Cocoapods is simply not worth the small benefit - it's constantly changing, does not work half of the time expect for the first install and completely obscure. – RunLoop Jul 30 '18 at 12:32
18

You have to edit the Podfile ($ emacs Podfile in terminal.app) and remove the line pod 'nyximagekit' from it. (ctrl+x, ctrl+s to save, then ctrl-x, ctrl+c to quit emacs)

Once you did that, run pod update and it will remove nyximagekit from your project.

Loegic
  • 3,390
  • 20
  • 33
  • 2
    why use the terminal when you could easily open the podfile with any editor? – palme Jul 28 '15 at 10:28
  • 1
    terminal will not add anything else to the file when editing, while some rich text editor will – Loegic Jul 28 '15 at 11:58
  • Thanks u all. it really help. – vic3ai Aug 03 '15 at 03:13
  • 1
    @palme Its depend on users convenience. Some one are addicted to terminal and command line. So they preferred terminal rather then text editor. Also, some editors convert quotes to smart quotes. – MilanPanchal Oct 01 '15 at 06:01
  • i removed pod. after that xcode shows missing file which is in removed pod. what can i do. – Mahesh Gawhane Jul 19 '17 at 04:48
  • Worked all good. I had to delete a folder in the project and a freamwork in the app setting, though. Oh... and... the `pod update` command updated another framework that fixed a bug I've been researching lately, hehe :D – Aeger Jan 16 '18 at 11:29
2

enter image description here

pictorial information detailed

vilas deshmukh
  • 389
  • 2
  • 5
0

Just remove that pod line that you want to remove and run pod update !

Ahsan
  • 503
  • 4
  • 12