Skip to content

Xcode Cloud: unable to open configuration settings file

This article addresses the common Xcode Cloud build error (unable to open configuration settings file) encountered by React Native developers. We'll explore causes, solutions, and best practices for resolving this issue in your CI/CD pipeline.

TL;DR: The Core Issue

This error occurs when Xcode Cloud build agents can't locate required configuration files (.xcconfig) during build execution, typically due to missing dependencies or improper environment setup.

Why This Error Occurs

The unable to open configuration settings file error appears when:

  1. CocoaPods dependencies aren't installed on the Xcode Cloud build server
  2. pod install hasn't been executed before building
  3. There are conflicts in project configuration files
  4. Required build tools like Node.js or Yarn are missing
  5. Plugin-specific configuration files conflict with build settings

Xcode Cloud build agents start with a clean environment and don't include native dependencies by default. Your build scripts must explicitly install required tools.

bash
unable to open configuration settings file
Pods-XXX.debug.xcconfig:1

Primary approach: Add custom scripts to your workflow

Step-by-Step Implementation

  1. Create a ci_scripts directory in your project root

  2. Add three script files to the directory:

    • ci_post_clone.sh
    • ci_pre_xcodebuild.sh
    • ci_post_xcodebuild.sh
  3. Configure ci_post_clone.sh to install dependencies:

zsh
#!/bin/zsh

# Fail on any command failure
set -ex

echo "🧩 Stage: Post-clone activated"

# Install essential tools
brew install node yarn cocoapods fastlane

# Install dependencies
cd .. && yarn && cd ios && pod install

echo "✅ Stage: Post-clone complete"
exit 0
  1. Add placeholder scripts for other stages (customize as needed):
zsh
#!/bin/zsh
echo "🧩 Stage: Pre-Xcode Build activated"
# Add any pre-build commands here
echo "✅ Stage: Pre-Xcode Build complete"
exit 0
zsh
#!/bin/zsh
echo "🧩 Stage: Post-Xcode Build activated"
# Add any post-build commands here
echo "✅ Stage: Post-Xcode Build complete"
exit 0

Key Benefits

  • Ensures dependencies are installed fresh on each build
  • Automatically sets up CocoaPods before Xcode builds start
  • Centralizes CI configuration with project code
  • Works for React Native, Flutter, Ionic, and native iOS projects

Key Requirements

  • File permissions must be executable (chmod +x ci_scripts/*.sh)
  • Scripts must exit with code 0 to continue build

Solution 2: Resolve CocoaPods Issues

If Solution 1 fails, try reinstalling CocoaPods

bash
# Uninstall existing CocoaPods versions
brew uninstall --cask cocoapods

# Install latest version
brew install cocoapods

# Force link to resolve path issues
brew link --overwrite cocoapods

Alternative Approaches

Run pod install Manually

For simpler setups, manually run:

bash
cd ios && pod install

Fix Project File Conflicts

Unmerge problematic changes in project.pbxproj:

  1. Revert merge commits affecting the file
  2. Remove conflicting files from commits
  3. Rebuild project structure

Check Problematic Plugins

For Capacitor/Ionic projects, investigate plugins:

  1. Find plugin config files:
bash
ios/App/Pods/Target Support Files/PluginName/*.xcconfig
  1. Remove problematic plugins:
bash
npm uninstall plugin-name
npx cap sync ios

Best Practices

  1. Always include pod install in CI scripts
  2. Use dependency caching in workflows when possible
  3. Run pod repo update regularly to avoid version conflicts
  4. Test build scripts locally using Docker environments
  5. Check Xcode Cloud logs for exact failure locations

Pro Configuration Tip

Include environment setup validation in your scripts:

bash
# Check tool versions
echo "Node: $(node -v)"
echo "Yarn: $(yarn -v)"
echo "CocoaPods: $(pod --version)"

Final Recommendations

For most React Native projects, Solution 1 (Xcode Cloud Scripts) provides the most reliable fix. The error typically occurs because:

  1. Build servers start without dependencies
  2. Native modules require CocoaPods setup
  3. React Native needs JavaScript dependencies installed

By implementing the build scripts, you ensure the Xcode Cloud environment matches your local development setup. If issues persist, audit your plugins and CocoaPods installation using the alternative solutions provided.