Xcode cannot open the Pods debug.xcconfig file
Pods-MyApp.debug.xcconfig unable to open fileShort answer
Xcode reads its pod settings from files in the Pods folder. If it cannot open one, either you opened the .xcodeproj instead of the .xcworkspace, or the Pods folder is missing in this checkout. Open the workspace first. If that does not help, run pod install in the Podfile folder.
Fix it fast
1Find out which cause you have
Check whether the Pods folder and the workspace exist next to your project.
ls -d Pods *.xcworkspace *.xcodeproj2Match what you see, then jump to its fix
What does the error look like?
Pods-MyApp.debug.xcconfig unable to open filecocoapod .modulemap file not found
Cause 1 of 2
The .xcodeproj was opened instead of the .xcworkspace
1Check
After pod install, CocoaPods generates an .xcworkspace. That workspace is the file to use every day, because it contains both your project and the Pods project.
ls -d *.xcworkspace2Fix
Close the project in Xcode and open the workspace instead.
open MyApp.xcworkspace3Verify
Build again. The Pods project appears next to your project in the navigator, and the file is found.
xcodebuild -workspace MyApp.xcworkspace -scheme MyApp buildConfirmed by guides.cocoapods.org
Cause 2 of 2
The Pods folder is not in this checkout
1Check
Checking the Pods folder into version control is optional, and many repositories ignore it. Then each clone has to generate it.
cat .gitignore | grep -i pods
ls Podfile Podfile.lock2Fix
Run pod install in the folder that holds the Podfile. It honors the versions in Podfile.lock.
pod install3Verify
The Pods folder now contains Target Support Files with the xcconfig and module map files.
ls Pods/Target\ Support\ Files/Confirmed by guides.cocoapods.org
How do I stop it coming back?
- Commit Podfile and Podfile.lock, and note in the README that a new clone needs pod install.
- Open the .xcworkspace from Finder or the terminal once it exists, and avoid the .xcodeproj.
- Do not move or rename the Pods folder by hand; let pod install recreate it.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.
Which stack is behind this page?
Related fixes
Mobile apps
CocoaPods warns it did not set the base configuration of your project
CocoaPods did not set the base configuration of your project because your project already has a custom config set
This warning means one of your build configurations already uses its own xcconfig file, so CocoaPods left it alone.
2 causes, each with a fixMobile apps
Cannot change the App Privacy answers in App Store Connect
Publish Your App Privacy Responses?
Only the Account Holder, Admin and App Manager roles can answer the App Privacy questions.
2 causes, each with a fixMobile apps
App record creation fails because you lack permission
You cannot add a new app in App Store Connect as a Developer or limited user
Only the Account Holder, an Admin or an App Manager can create an app record, and Apple blocks it until the Account Holder has signed the latest agreement.
3 causes, each with a fixMobile apps
You cannot find the button to pull your app back from review
No 'remove this version from review' message appears on the version page
There is no button called Reject Binary.
3 causes, each with a fixMobile apps
Your Apple Account cannot sign in to App Store Connect
Sign-in to App Store Connect is refused for an account that should have access
App Store Connect does not open to every Apple Account.
3 causes, each with a fixMobile apps
Apple rejected the app under Guideline 4.3, Design: Spam
Guideline 4.3(b) - Design - Spam
Guideline 4.3 is Apple's duplicate rule.
5 causes, each with a fix