Cocoapods: [1.6.0.beta.2] XCConfig files are not properly deintegrated from the user project

Created on 13 Sep 2018  Â·  31Comments  Â·  Source: CocoaPods/CocoaPods

I can't build my project, here is the error :"-1: /Users/XXX/XXX/XXX/XXX/Pods/Pods/Target Support Files/Pods-XXX/Pods-XXX.debug.xcconfig: unable to open file (in target "registrodocentiSOGI" in project "registrodocentiSOGI") (in target 'registrodocentiSOGI')".
I am building this project with xCode 10, if I try to build another project I have no problem.
I have already done 'pod deintegrate' and 'pod install'.

The correct path is " /Users/XXX/XXX/XXX/XXX/Pods/Target Support Files/Pods-XXX/Pods-XXX.debug.xcconfig". Why there are two "/Pods/"? How to fix it? Thank you in advance

confirmed workaround available defect

Most helpful comment

I have also upgraded to 1.6.0 beta and then downgraded, i fixed with:

  1. “pod deintegrate”
  2. “sudo gem install cocoapods-clean”
  3. “pod clean”
  4. Open the project and delete the “Pods” folder that should be red
  5. “pod setup”
  6. “pod install”

All 31 comments

Please upload a sample demonstrating the issue. There is not enough information here to work with and diagnose.

Try rm -rf Pods/ and pod install again.

@dnkoutso the problem is that if I create a brand new project I don't experience the same issue unfortunately, I tried your steps but nothing.

Again sorry, we cannot easily assist with given information. Seems like a local issue with your configuration/setup.

Currently happening also in our case. Migrated to CocoaPods 1.6.0 beta with XCode 10, then downgraded to 1.5.3 still with XCode 10 - pod install (even after pod deintegrate and removing Pods folder + xcworkspace file) does thing that instead of /Target Support Files it installs .xcconfig files to /Pods/Target Support Files (so result is Project/Pods/Pods/Target Support Files) that don't exist.

No idea if it's happening because of upgrade to beta and then downgrade back to 1.5.3.

I have also upgraded to 1.6.0 beta and then downgraded, i fixed with:

  1. “pod deintegrate”
  2. “sudo gem install cocoapods-clean”
  3. “pod clean”
  4. Open the project and delete the “Pods” folder that should be red
  5. “pod setup”
  6. “pod install”

Tried, removed, reinstalled, without any luck.

The project.pbxproj still has these values after that:

        B4636A29CDDE71FFF7E571B6 /* Pods-App Unit Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ClassDojo Unit Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-App Unit Tests/Pods-ClassDojo Unit Tests.debug.xcconfig"; sourceTree = "<group>"; };
        B6FE5B251BFD18293657C5D0 /* Pods_App.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_App.framework; sourceTree = BUILT_PRODUCTS_DIR; };
        BC1921ED8C4120EBA62F8126 /* Pods-Share Extension Alpha.testing.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Share Extension Alpha.testing.xcconfig"; path = "Pods/Target Support Files/Pods-Share Extension Alpha/Pods-Share Extension Alpha.testing.xcconfig"; sourceTree = "<group>"; };
        C2047CE4A5F3D8E09FA44804 /* Pods_App_Alpha.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_App_Alpha.framework; sourceTree = BUILT_PRODUCTS_DIR; };

where the path - path = "Pods/Target Support Files/Pods-App Unit Tests/Pods-ClassDojo Unit Tests.debug.xcconfig"; is incorrect - because then final result that fails is :-1: /Users/username/Documents/App/Pods/Pods/Target Support Files/Pods-Share Extension/Pods-Share Extension.debug.xcconfig: unable to open file (in target "Share Extension" in project "App") (in target 'Share Extension')... I feel like there is some PATH variable in build settings that I can set to fix this.

After few hours and diffs found and issue. Posting here for interested and maybe @dnkoutso if more people would report this. Probably related to 1.6.0 and 1.5.3 changes, but no idea why deintegrate and install again didn't fix it.
Old version in pbxproj file had "name", new version has "path" - which points to Pods folder and automatically adds Pods to the path. After manually changing this in TextEdit back to name, everything works.
cocoapods

the change to include path on the Pods group was done here: https://github.com/CocoaPods/CocoaPods/pull/7886

Setting the path of a group shouldn't be an issue though.

A sample project would be really helpful here

This issue will be auto-closed because there hasn't been any activity for a few days. Feel free to open a new one if you still experience this problem :+1:

gem install cocoapods --pre
1.6.0 beta1 has fixed it .

I had the same issue on travis, but gem install cocoapods --pre fixed it. My question and answer on Stackoverflow

The lesson I've learned today.

Never install a beta Cocoapods. What a waste of my time dealing with this issue.

@Kaspik - thank you for posting your solution/fix. It was much more elegant than the way I worked it out, and I'm so happy that I don't have to have 2 to 3 unnecessary xcconfigs per build scheme committed into my git history.

Xcode 10.1
After trying other suggestions found here https://github.com/CocoaPods/CocoaPods/issues/8091#issuecomment-437931830 and at https://stackoverflow.com/questions/27109476/incorrect-path-for-pods-debug-xcconfig-in-xcode
I found that Kaspik's suggestion worked:

pod reintegrate
pod install

edit the .xcodeproj/project.pbxproj file and change the PBXGroup "path = Pods" to "name = Pods"

Happy that it helps a lot of you.

@amorde Sorry, I would love to give you sample - as maybe it needs just new project, older cocoapods, then pre cocoapods, and then try to downgrade again - but I'm currently not available to do that. As you can see, it's a bigger problem than just one person so it might be worth it to investigate the way how the path is integrated newly. :/

Just commenting that this is still an issue with compatibility between pods built with 1.6 pre-2 and installed with 1.5.3. The pods installed with 1.5.3 still can not build.

I'll re-open this and will try to investigate - if anyone can get a sample project that will produce the bug that would be super helpful

I've made a sample project for you. Clone https://github.com/IainDelaney/MyTestLib.git
Steps followed: pod lib create MyTestLib with cocoapods version 1.5.3. Go to the Example folder.
pod deintegrate
install cocoapods beta 2 with sudo gem install cocoapods --pre
pod install
open the sample workspace, try to build. See the linker error 'ld: framework not found Pods_MyTestLib_Example'
This is not the exactly the same as the previous problem but it does show the 'Pods_' prefix.

@IainDelaney Sorry I cannot reproduce what you are describing - it also sounds unrelated to this issue as a ld: framework not found error is very different from a missing .xcconfig reference

I've tried creating a new project using 1.5.3, updating to 1.6.0.beta.2 and re-running pod install and the configs are there correctly.

I did notice an issue when _downgrading_, but I didn't think that was the problem that was being described here - @Kaspik @GZaccaroni were you only seeing this issue when downgrading from the beta to 1.5.3?

YES! All the time! :))

https://github.com/CocoaPods/CocoaPods/issues/8091#issuecomment-421537449

Also here - https://github.com/CocoaPods/CocoaPods/issues/8091#issuecomment-439176780 :) but still no idea why deintegrate doesn’t work and doesn’t update pbxproj.

Apologies I misread your previous comments - I can repro now 👍

This only appears to happen if you do not run pod deintegrate before downgrading to 1.5.3

No worries, thanks for digging in!

Taking another look at this, running pod deintegrate && pod install appears to work correctly even _after_ downgrading from 1.6.0 - this is reasonable to me, considering the change to the Pods group is not backwards compatible with 1.5.3

At this point this looks like it's working as expected. If you are downgrading from 1.6.0 to 1.5.3, you will need to run pod deintegrate followed by pod install

Given new versions of CocoaPods can introduce functionality that is not backwards compatible, it seems reasonable to run pod deintegrate and pod install whenever downgrading to an older version.

I'm going to close this but still open to feedback or suggestions to improve this

Wow, can't believe that path --> name solution fixes it!

I also surprised that path ---> name could be the solution.
Anyway, it solved my problem and saved my time..
Thanks guys.

I tried below and error went away !!

My project name - SwiftExample

Went to Pods -> Info -> Configurations -> Debug
Change to None for Pods-SwiftExample

Code compiled.

Compiling even after setting it back to original value.

Ashish

I encountered with this error when one of my colleagues have installed the latest cocoapods version and I was using an old one.

I'm on version 1.7.2 and I actually had to change name to path to get it to work

After few hours and diffs found and issue. Posting here for interested and maybe @dnkoutso if more people would report this. Probably related to 1.6.0 and 1.5.3 changes, but no idea why deintegrate and install again didn't fix it.
Old version in pbxproj file had "name", new version has "path" - which points to Pods folder and automatically adds Pods to the path. After manually changing this in TextEdit back to name, everything works.
cocoapods

Thank you, it worked for me! 👍

Was this page helpful?
0 / 5 - 0 ratings

Related issues

evermeer picture evermeer  Â·  3Comments

sonu5 picture sonu5  Â·  3Comments

soleares picture soleares  Â·  3Comments

pallaviMN picture pallaviMN  Â·  3Comments

hmistry picture hmistry  Â·  3Comments