How to remove Cocoapods from your project

⋅ 1 min read ⋅ Xcode Cocoapods App Development

Table of Contents

Cocoapods serve us well for years, but Swift Package Manager (SPM) is getting better and better recently. If you are the one who wants to adopt SPM and say goodbye to our old friend, this is how to do it right.

[sudo] gem install cocoapods-deintegrate
pod deintegrate

The only things that will remain from pod deintegrate are as follows:

  • Podfile
  • Podfile.lock
  • Workspace

You can manually remove those files.

Too lazy

If you are too lazy to remove those files, there is cocoapods-clean gem, which will remove Podfile.lock, Pods/ and *.xcworkspace for you. The only thing left is Podfile, which you can remove it with remove command rm.

[sudo] gem install cocoapods-deintegrate cocoapods-clean
pod deintegrate
pod clean
rm Podfile

Your project is now Cocoapods free and ready for a shiny SPM.

You can easily support sarunw.com by checking out this sponsor.

Sponsor sarunw.com and reach thousands of iOS developers.

Read more article about Xcode, Cocoapods, App Development, or see all available topic

Enjoy the read?

If you enjoy this article, you can subscribe to the weekly newsletter.
Every Friday, you'll get a quick recap of all articles and tips posted on this site. No strings attached. Unsubscribe anytime.

Feel free to follow me on Twitter and ask your questions related to this post. Thanks for reading and see you next time.

If you enjoy my writing, please check out my Patreon https://www.patreon.com/sarunw and become my supporter. Sharing the article is also greatly appreciated.

Become a patron Buy me a coffee Tweet Share
Previous
How to read a Property List (plist) into the code

When I want to keep some information or configuration out of a code base and don't want something fancy, I usually save it as Property List file. Let's see how to do it.

Next
How to create Neumorphic design in SwiftUI

Neumorphism or Neomorphism is a new design trend of UI recently. We are going to see how to implement this in SwiftUI.

← Home