3

I need to remove a specific CocoaPod from my Xcode project. Browsing similar questions here on Stack Overflow, I ran into situations where the leading answer caused me to remove all my pods from the project and delete the workspace. Another answer suggested I simply needed to delete the pod from my Podfile and then run pod install, but that doesn't work either; I got several errors related to that pod when I went to build the app.

If I check the Pods folder via Finder, the deleted pods are no longer there. However, if I check Pods > Targets via the workspace, I still see the pods I deleted. They are also still in the Pods > pods directory in the workspace.

For now, I've deleted the related pods from the Pods > Targets area and the app builds fine. The pods are still in my Pods > pods directory though. Can I delete those? And, should pod install be handling all this for me in one go?

1
  • you need to delete the pod file and reinstall it with the pod file you want removed Commented Feb 27, 2019 at 18:12

2 Answers 2

6

You deleted specific pods your app. For examples your podfile

target 'AppTargetName' do use_frameworks! pod 'Alamofire' pod 'SwiftyJSON' pod 'OneSignal' pod 'Fabric' end 

if You want to delete only Fabric pods, you remove this and terminal commant pod install So in the last case;

target 'AppTargetName' do use_frameworks! pod 'Alamofire' pod 'SwiftyJSON' pod 'OneSignal' end 

Good works :)

Sign up to request clarification or add additional context in comments.

2 Comments

that's what I did however the pod was still located in my targets and in the pod directory in my workspace. Any reason those would hang around after deleting from the pod file and running pod install?
Deletes as a reference when deleting and not trash. But not important you. You can delete what you don't use. If it's true, can you confirm my answer?
2

You want to remove specific pods your app. For examples your podfile

Your podfile have

pod 'FirebaseAuth' pod 'FirebaseFirestore' pod 'FirebaseDatabase' 

Remove one of your doesn't need (pod 'FirebaseDatabase')

pod 'FirebaseAuth' pod 'FirebaseFirestore' 

Then open the terminal of directory of your project podfile

pod install 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.