pod installAll CocoaPods setup for that target should be cleaned up from the Xcode project.
.xcconfig files are left in the Pods group.framework file is left in the Frameworks groupHere, the ShareExt target was added to the project & Podfile and later removed:

Note: if I first remove the target block from the Podfile and run pod install before removing the target from Xcode, the .xcconfig entries are correctly removed. The Pods_ShareExt.framework entry however is still left in the Xcode project:

CocoaPods : 1.3.0.beta.2
Ruby : ruby 2.3.3p222 (2016-11-21 revision 56859) [x86_64-darwin16]
RubyGems : 2.6.8
Host : Mac OS X 10.12.5 (16F73)
Xcode : 8.3.3 (8E3004b)
Git : git version 2.11.0 (Apple Git-81)
Ruby lib dir : /Users/kuba/.rvm/rubies/ruby-2.3.3/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ 8923943e4910f5a92169ede9332cef619cc195fe
Executable Path: /Users/kuba/.rvm/gems/ruby-2.3.3/bin/pod
cocoapods-deintegrate : 1.0.1
cocoapods-plugins : 1.0.0
cocoapods-search : 1.0.0
cocoapods-stats : 1.0.0
cocoapods-trunk : 1.2.0
cocoapods-try : 1.1.0
target 'RemovingTargetTest' do
use_frameworks!
platform :osx, '10.12'
pod 'CocoaLumberjack'
end
target 'RemovingTargetTest' do
use_frameworks!
platform :osx, '10.12'
pod 'CocoaLumberjack'
end
target 'ShareExt' do
use_frameworks!
platform :osx, '10.12'
pod 'CocoaLumberjack'
end
https://www.dropbox.com/s/yi0znug6otnq8zc/RemovingTargetTest.zip?dl=0
(git history included)
The test project was done in Xcode 9 beta 2, but I've seen this happening earlier in Xcode 8 too.
Same thing happens when you have targets grouped under an abstract target (in which case CocoaPods adds a prefix to the file names) and then you remove the abstract targets and move the target definitions to the root. In that case, the prefixed versions of .xcconfig and .framework entries stay in the Xcode project, and unlike the above case, there is no workaround of deleting the target in the Xcode first (since the target isn't deleted at all):

abstract_target 'Mac' do
target 'AbstractTargetTest' do
use_frameworks!
pod 'CocoaLumberjack'
end
end
target 'AbstractTargetTest' do
use_frameworks!
pod 'CocoaLumberjack'
end
Does bundle exec pod deintegrate then bundle exec pod install remove them?
Yup, in both scenarios pod deintegrate removes all .xconfig and .framework entries and pod install recreates only the correct ones.
@dnkoutso I think this might be related to you removing the 0.34 migration or something similar to that?
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
This issue will be auto-closed because there hasn't been any activity for a few months. Feel free to open a new one if you still experience this problem :+1:
This is still an issue. @segiddins I don't think its related to that change. I can repro it.
@mackuba this is an old issue, I cannot reproduce at the moment anymore. Will try your sample project now.
repro'd and I only get the .framework file remaining, not the xcconfig files.
Most helpful comment
Does
bundle exec pod deintegratethenbundle exec pod installremove them?