What's the right way of removing CocoaPods from a project? I want to remove the whole CocoaPod. Due to some limitations imposed by my client I can't use it. I need to have just one xcodeproj instead of an xcworkspace.
Xcode – How to remove CocoaPods from a project
cocoapodsxcode
Related Topic
- Iphone – Ignore Xcode warnings when using Cocoapods
- Ios – Libraries not found when using CocoaPods with iOS logic tests
- Xcode – The target … overrides the `OTHER_LDFLAGS` build setting defined in `Pods/Pods.xcconfig
- Ios – How to install CocoaPods
- Ios – Cocoapods Warning – CocoaPods did not set the base configuration of your project because because your project already has a custom config set
- C# – VS 2008 wsdl tool converting xsd:positiveInteger to string
Best Answer
Removing CocoaPods from a project is possible, but not currently automated by the CLI. First thing, if the only issue you have is not being able to use an
xcworkspace
you can use CocoaPods with justxcodeproj
s by using the--no-integrate
flag which will produce thePods.xcodeproj
but not a workspace. Then you can add thisxcodeproj
as a subproject to your mainxcodeproj
.If you really want to remove all CocoaPods integration you need to do a few things:
NOTE editing some of these things if done incorrectly could break your main project. I strongly encourage you to check your projects into source control just in case. Also these instructions are for CocoaPods version
0.39.0
, they could change with new versions.Podfile
Podfile.lock
and yourPods
directory)xcworkspace
xcodeproj
file, delete the references toPods.xcconfig
andlibPods.a
(in theFrameworks
group)Build Phases
delete theCopy Pods Resources
,Embed Pods Frameworks
andCheck Pods Manifest.lock
phases.After those steps you should be set with a single
xcodeproj
that existed before you integrated CocoaPods. If I missed anything let me know and I will edit this.Also we're always looking for suggestions for how to improve CocoaPods so if you have an issues please submit them in our issue tracker so we can come up with a way to fix them!
EDIT
As shown by Jack Wu in the comments there is a third party CocoaPods plugin that can automate these steps for you. It can be found here. Note that it is a third party plugin and might not always be updated when CocoaPods is. Also note that it is made by a CocoaPods core team member so that problem won't be a problem.