Skip to content

Instantly share code, notes, and snippets.

@nvkiet
Created July 18, 2014 05:56
Show Gist options
  • Save nvkiet/92a39a2ab46c3f224749 to your computer and use it in GitHub Desktop.
Save nvkiet/92a39a2ab46c3f224749 to your computer and use it in GitHub Desktop.
Removing CocoaPods from a project
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 just xcodeprojs by using the --no-integrate flag which will produce the Pods.xcodeproj but not a workspace. Then you can add this xcodeproj as a subproject to your main xcodeproj.
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.28.0, they could change with new versions.
Delete the standalone files (Podfile Podfile.lock and your Pods directory)
Delete the generated xcworkspace
Open your xcodeproj file, delete the references to Pods.xcconfig and libPods.a (in the Frameworks group)
Under your Build Phases delete the Copy Pods Resources and Check Pods Manifest.lock phases.
This may seem obvious but you'll need to integrate the 3rd party libraries some other way or remove references to them from your code.
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment