Incorrect path for Pods.debug.xcconfig in Xcode?
Asked Answered
C

18

60

so I used Venmo/Synx on my Xcode project with CocoaPods, and it completely screwed everything up.

I was able to fix the Manifest.lock and Podfile.lock errors, but now I am getting this error:

The file “Pods.debug.xcconfig” couldn’t be opened because there is no such file. (/Users/user/GitHub/xxxxxx/Pods/Pods/Target Support Files/Pods/Pods.debug.xcconfig)

As you can see, the path is incorrect, as there is no Pods/Pods directory (there is one extra pod).

How can I fix this? I have only added PODS_ROOT to the user-defined variable, as that fixed my Podfile and Manifest.lock files.

Any help would be much appreciated!


Edit:

After adding PODS_ROOT, I get this when running pod install.

[!] The `Project [Debug]` target overrides the `PODS_ROOT` build setting defined in `Pods/Target Support Files/Pods/Pods.debug.xcconfig'. This can lead to problems with the CocoaPods installation
    - Use the `$(inherited)` flag, or
    - Remove the build settings from the target.
Curculio answered 24/11, 2014 at 16:27 Comment(7)
Just running pod install again may fix this issue.Geter
@KeithSmiley I've tried that many times, including removing all traces of CocoaPods and then re adding. I've tried pod update too, to no avail. Just can't nail this issue.Curculio
Pods should be excluded from the synx as well: github.com/venmo/synx/blob/master/lib/synx/project.rb#L10Geter
@KeithSmiley Yeah, I saw that too, however, I am using SVProgressHUD, and when I ran synx it removes all the images, so I just ran pod install again, which gave me all the errors. I fixed it by adding PODS_ROOT to get rid of the Podfile.lock and the Manifest.lock error. Now I'm getting this error :/Curculio
just double checking... are you opening the workspace file? or the .xcodeprojHacker
@Hacker Definitely the workspace file. I see the xcconfig and everything, the path is just off.Curculio
github.com/CocoaPods/CocoaPods/issues/3341 "These warnings are not build warnings, they are about your SVN repository."Schindler
D
65

I had the same problem in Xcode 6.1.1. I did the following to solve it:

  1. Set the configuration file setting* "None" for the Pods related target.
  2. Close the .xcworkspace.
  3. run pod install again
  4. now open and build your .xcworkspace

*The configuration file setting is found by selecting the project (not the target) and then the Info tab.

Domesticity answered 7/12, 2014 at 17:43 Comment(5)
What do you mean with 1. Set the project setting "None" for the Pods related target.Drusilla
For step number 1, this setting is found by selecting the project (not the target) and then the Info tab.Landgrabber
doesnt work anymore, the settings gets overriden by pod installMcalpin
Select Project -> Info tab -> Configurations -> Debug -> Change file setting to "None"Frostbitten
There was a second config file i could select from, selecting that fixed itRefrigeration
T
36

If your path to pods in error is wrong try this:

  • use pod deintegrate
  • delete all pod remains files - Podfile.lock, Pods, <Project>.xcworkspace
  • open <Project>.xcodeproj
  • remove Pods project on left side
  • try pod install
Tambourin answered 5/3, 2019 at 7:47 Comment(2)
This plus updating Cocoapods before doing so did the trick for me. Thanks! In Terminal project folder - sudo gem update cocoapodsHacker
This worked for me except after performing all these steps I had to do 'Clean Build Folder' and delete 'Derived Data'.Before
P
21

I had the same problem with Xcode 11 but I just updated CocoaPods and it worked.

  1. Update CocoaPods to latest version with sudo gem install cocoapods
  2. Run pod install again
Pewit answered 7/6, 2019 at 15:52 Comment(3)
This is the solution, If you tried to migrate your pods to Swift 5.Clarisaclarise
Current in 2019.Quintuplicate
This solution didn't work when I mix it with other solutions. But, when applied it again as a fresh and only solution then it WORKED.Educable
B
12

I had the same error while trying to build my project for the first time. This is how I resolved it:

  • pod deintegrate
  • sudo gem install cocoapods-clean
  • pod clean

Open the project and delete the “Pods” folder that should be red.

  • pod setup
  • pod install

Reopen and build the project, I think it's good to go!

Beer answered 5/3, 2019 at 15:58 Comment(0)
M
8

I faced this issue when I upgraded/downgraded cocoapods between 1.6.x and 1.5.x. The following step fixed this error

1, go to project info tab

2, just under Deployment target, there is configurations field. change your configuration. In my case, there are 2 options

/Users/user/GitHub/xxxxxx/Pods/Pods/Target Support Files/Pods/Pods.debug.xcconfig

/Users/user/GitHub/xxxxxx/Pods/Target Support Files/Pods/Pods.debug.xcconfig

3, clean and build again.

Mandiemandingo answered 25/3, 2019 at 22:37 Comment(0)
C
3

1- Remove your Pods folder Podfile.lock and xcworkspace files root in your project.

2- Open .xcodeproj

3- Go to Build Settings and under Build Options search Always Embed Swift Standard Libraries

4- Update its value with $(inherited)

5- Close project and pod install again

enter image description here

Chroma answered 22/1, 2019 at 14:8 Comment(0)
M
3

There has been an update to cocoa pods that is causing this problem. Please refer to the cocoa pods release notes :

Change shell script relative paths to use ${PODS_ROOT} instead of ${SRCROOT}/Pods. Whirlwind #7878

This was done in version 1.6.0.beta.1 (2018-08-16) Release notes are here: cocoapods release notes

Mercymerdith answered 6/3, 2019 at 2:14 Comment(1)
Build server was using 1.5.3 and dev machine was using 1.6.1Purnell
T
2

I got the same situation in Xcode 10.1. This is what works for me.

  1. Open <Project>.xcworkspace
  2. Go into your <project_name> folder(by default it's blue), delete the Pods folder (by default it's yellow)
  3. In Terminal.app, run pod install again
  4. Then I'm able to CMD + R to run the simulator
Trotman answered 12/3, 2019 at 14:37 Comment(2)
Thanks for sharing, Wei. Mine's Xcode 10.2.1 with CP version 1.5.3. This happened after merging commits from a teammate who's using CP 1.7.Leora
@Euridice01 In Terminal.app, under your project folderTrotman
F
2

I had the same error and I fixed in following way

1 - Goto your projected setting by blue icon of your project from left pan 2 - Select your project under the project 3 - Select Info window 4 - Check IOS deployement target. This target should be same as you set in general settings of your project (Pic 2).

enter image description here

enter image description here

Fonseca answered 4/8, 2019 at 10:10 Comment(0)
A
2

Go to project directory right click on

project.xcodeproj -> show package contents -> open project.pbxproj

Find

"Pods/Target Support Files/

and replace with

"Target Support Files/

This solution will work at any cost!

Ation answered 3/12, 2020 at 15:53 Comment(0)
P
1

A few things worth trying:

  • As Keith mentioned above, you definitely want to exclude Pods from synx.
  • You almost certainly do not want to override the PODS_ROOT build setting.
  • I've seen similar errors to yours in a project with multiple targets. Make sure that your Podfile includes a link_with setting that specifies all your app targets.
  • If you have at least one test target, consider using your Podfile to explicitly import all your app pods to both your application and test targets.
  • I've not too much experience using a custom xcconfig with CocoaPods, but you might first try removing your xcconfig and allowing CocoaPods to generate its own first.
Prelect answered 24/11, 2014 at 18:1 Comment(3)
Thanks for the response Jonathan. A few things: I am not using a custom xcconfig, just trying to use the one built. I am only overriding the PODS_ROOT build setting because it is fixing the Podfile.lock and Manifest.lock missing error, which also started after running synx. I am only using one target, and tried link_with.Curculio
Okay, but I really don't think that's the underlying issue here. I would be surprised if your custom PODS_ROOT isn't causing more problems than it is solving.Prelect
it's possible, but how do I go from there, then?Curculio
A
1
  1. Close project
  2. Do pod deintegrate
  3. Delete - Podfile.lock, Pods,.xcworkspace in project directory
  4. Do sudo gem install cocoapods
  5. Do pod install
Antihistamine answered 21/8, 2019 at 4:11 Comment(0)
S
0

Try deleting the debug.xcconfig file and run pod install again. It solved my issue

Stridulous answered 6/3, 2017 at 1:29 Comment(1)
where did you find that file ?Avent
A
0

In my case, I deleted my Podfile, Podfile.lock. Run pod init, then copy all pods to new Podfile, then run pod install again and it's worked. I think it's happened for the differences from folder paths in the old project (for me, I cloned another project from Git repo).

Astray answered 13/5, 2019 at 11:48 Comment(0)
D
0

For me, changing Build system to Legacy in File -> workspace settings did the trick

Dickman answered 3/7, 2019 at 12:10 Comment(0)
B
0

For me, this caused after I updated cocoapods. So, I downgraded and the build worked again.

To downgrade, first list of all your versions:

sudo gem list cocoapods

Then specify the you want to delete (for me was 1.8.4):

sudo gem uninstall cocoapods -v 1.8.4

Then, with 1.5.3 worked!

Blastoff answered 17/12, 2019 at 20:16 Comment(0)
S
0

This is what worked for me !

I use always Bundler to manage ruby dependencies, then in all my iOS projects i have Gemfile that look like this !

source "https://rubygems.org"

gem "cocoapods"
gem "fastlane"
gem "jazzy"

gem 'xcodeproj', :git => 'https://github.com/CocoaPods/Xcodeproj.git'
gem 'fastlane-plugin-teams', :git => "https://github.com/mbogh/fastlane-plugin-teams"

plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
eval_gemfile(plugins_path) if File.exist?(plugins_path)

i just run the following, i advice you using alias for this :

## Alias to add in zshrc or bashrc

# bundle install
bdli() {
  bundle install $@;
}

piu() {
  kill $(ps aux | grep 'Xcode' | awk '{print $2}');
  pod deintegrate;
  pod repo update;
  pod install;
  pod update;
  open -a Xcode *.xcworkspace;
}

then simply run :

bdli && piu

It will do everything for you :)

PS : To install Bundler go here -> Bundler

Starnes answered 10/12, 2020 at 11:9 Comment(0)
S
0
pod deintegrate ("Deintegrate your project from CocoaPods. Removing all traces of CocoaPods from your Xcode project:")
pod install

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

Stanfield answered 5/1, 2022 at 13:18 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.