Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4072 pages
Flutter and app store releases

Xcode cannot open the Pods debug.xcconfig file

ErrorPods-MyApp.debug.xcconfig unable to open file

Short 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.

  • Applies to CocoaPods 1.16, Xcode 26
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Fix it fast

  1. 1Find out which cause you have

    Check whether the Pods folder and the workspace exist next to your project.

    ls -d Pods *.xcworkspace *.xcodeproj
  2. 2Match what you see, then jump to its fix

    1. 1The Pods folder exists, yet the build still cannot see pod filesThe .xcodeproj was opened instead of the .xcworkspaceFix
    2. 2ls shows no Pods folder, for example after a fresh git cloneThe Pods folder is not in this checkoutFix

What does the error look like?

  • Pods-MyApp.debug.xcconfig unable to open file
  • cocoapod .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 *.xcworkspace

2Fix

Close the project in Xcode and open the workspace instead.

open MyApp.xcworkspace

3Verify

Build again. The Pods project appears next to your project in the navigator, and the file is found.

xcodebuild -workspace MyApp.xcworkspace -scheme MyApp build

Confirmed by guides.cocoapods.org

Did this fix it?

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.lock

2Fix

Run pod install in the folder that holds the Podfile. It honors the versions in Podfile.lock.

pod install

3Verify

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

Did this fix it?

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

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 fix

Next step

Want this handled for good?

I look after servers, apps and releases end to end. Tell me what keeps breaking.