CocoaPods/cocoapods-deintegrate

pod deintegrate does not remove pods project reference, pods framework reference and Podfile.lock from workspace which cause problems when pod is integrated again

vikram-rao opened this issue ยท 12 comments

When we do pod deintegrate, the reference to Pods project in workspace is not removed and so is the pods framework reference under Frameworks group. Podfile.lock remains too. So this is not a complete pod deintegration.

Now post deintegrate, when pod is installed again afresh via pod install, the copy resources and copy frameworks build phases are not added to the targets.

The workaround is to manually remove the pod project, framework and podfile.lock and then integrate cocoapod again for the build phases to show up correctly.

kylef commented

That's intentional, please read the output of pod deintegrate along with the README.

Project has been deintegrated. No traces of CocoaPods left in project.
Note: The workspace referencing the Pods project still remains.

https://github.com/kylef/cocoapods-deintegrate#usage

Ok i get that project, Podfile.lock remains. But should not the framework reference go? I don't know the reason but after de-integrate, when i install pods again, the build phases are not added to the targets. But when i remove the framework reference along with project reference and Podfile.lock, it does get added again properly.

kylef commented

The frameworks reference should be removed from your project. Can you share the output of pod deintegrate?

$ pod deintegrate
Deintegrating ConfNGiOS.xcodeproj
dyld: warning, LC_RPATH @executable_path/../../../../../../../SharedFrameworks in /Applications/Xcode.app/Contents/SharedFrameworks/DVTFoundation.framework/Versions/A/../../..//DVTInstrumentsFoundation.framework/Versions/A/DVTInstrumentsFoundation being ignored in restricted program because of @executable_path
dyld: warning, LC_RPATH @executable_path/../lib in /Applications/Xcode.app/Contents/Frameworks/IDEFoundation.framework/Versions/A/../../../../Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libclang.dylib being ignored in restricted program because of @executable_path
dyld: warning, LC_RPATH @executable_path/../lib in /Applications/Xcode.app/Contents/Frameworks/IDEFoundation.framework/Versions/A/../../../../Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libLTO.dylib being ignored in restricted program because of @executable_path
dyld: warning, LC_RPATH @executable_path/../Frameworks in /Applications/Xcode.app/Contents/PlugIns/Xcode3Core.ideplugin/Contents/MacOS/Xcode3Core being ignored in restricted program because of @executable_path
Deintegrating target ConfNGiOS
Deleted 1 'Copy Pods Resources' build phases.
Deleted 1 'Check Pods Manifest.lock' build phases.
Deleted 1 'Embed Pods Frameworks' build phases.
Deintegrating target ConfNGiOSTests
Deleted 1 'Copy Pods Resources' build phases.
Deleted 1 'Check Pods Manifest.lock' build phases.
Deleted 1 'Embed Pods Frameworks' build phases.
Deintegrating target InstaConfCore
Deleted 1 'Copy Pods Resources' build phases.
Deleted 1 'Check Pods Manifest.lock' build phases.
Deintegrating target InstaConf
Deleted 1 'Copy Pods Resources' build phases.
Deleted 1 'Check Pods Manifest.lock' build phases.
Deleted 1 'Embed Pods Frameworks' build phases.
Deintegrating target DrawerMenu
Deleted 1 'Copy Pods Resources' build phases.
Deleted 1 'Check Pods Manifest.lock' build phases.
Deintegrating target Connect
Deleted 1 'Copy Pods Resources' build phases.
Deleted 1 'Check Pods Manifest.lock' build phases.
Deintegrating target LoginProviders
Deleted 1 'Copy Pods Resources' build phases.
Deleted 1 'Check Pods Manifest.lock' build phases.
Deintegrating target IOSLinkedInAPI
Deleted 1 'Copy Pods Resources' build phases.
Deleted 1 'Check Pods Manifest.lock' build phases.
Deleting Pod file references from project
- Pods.debug.xcconfig
- Pods.release.xcconfig
- Pods.adhoc.xcconfig
Deleted 1 empty `Pods` groups from project.
Removing `Pods` directory.

Project has been deintegrated. No traces of CocoaPods left in project.
Note: The workspace referencing the Pods project still remains.

pod_status

Attached screen grab of the project in Xcode,

kylef commented

Can you close Xcode and then run pod deintegrate.

This was done with Xcode closed. I opened Xcode after deintegrate to show the project status.

svdo commented

I have the same problem; In "build phases", "link binary with libraries", Pods.framework is still listed.

Can either of you please share a project that exhibits this issue so we can debug? Thanks!

svdo commented

This concerns code that I am not allowed to share, but I will check whether your solution also works for me. I'll report it here later.

It would automatically de-integrate if your xcodeproj was in the root project directory, if not you do need to manually run pod deintegrate.
CocoaPods/CocoaPods#5208 (comment)

cd ios then do it