Eric Hubbell
Eric Hubbell

Reputation: 49

Remove a specific pod from Xcode project

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?

Upvotes: 3

Views: 8624

Answers (2)

Chithian
Chithian

Reputation: 341

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

Upvotes: 2

ikbal
ikbal

Reputation: 1250

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 :)

Upvotes: 6

Related Questions