Edie W.
Edie W.

Reputation: 867

Xcode Cloud: unable to open configuration settings file

I'm working with a React Native project, setting up Xcode Cloud builds.

I keep getting this error:

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

Xcode Cloud Screenshot

The files in my workspace look like the following:

|-- XXX
|-- Pods
|.  -- Podfile
|.  -- Targets Support Files
|.     -- Pods-XXX
|.        -- Pods-XXX.debug

Upvotes: 41

Views: 54730

Answers (5)

Bek Roz
Bek Roz

Reputation: 857

Guess what? XCode is garbage but doc can help us here.

This what I'm using to smoothly build my workflow. I'l share exact bash scripts here.

Why it's failing?

  1. First open logs on your workflow window side bar.

  2. Check if you're installing necessary dependencies before running archive process. You're using virtual machine so any dependencies like cocoapods or yarn aren't installed by default there.

If you haven't read and skipped to the SOLUTION:

Here is the steps:

  1. Create ci_scripts folder inside root folderenter image description here.

  2. Create 3 files inside ci_scripts folder:

    1. ci_post_clone.sh
    2. ci_post_xcodebuild.sh
    3. ci_pre_xcodebuild.sh
  3. Inside your ci_post_clone.sh file add this:

     #!/bin/zsh
    
     # fail if any command fails
    
     echo "🧩 Stage: Post-clone is activated .... "
    
     set -e
     # debug log
     set -x
    
     # Install dependencies using Homebrew. This is MUST! Do not delete.
     brew install node yarn cocoapods fastlane
    
     # Install yarn and pods dependencies.
     # If you're using Flutter or Swift 
     # just install pods by "pod install" command 
     ls && cd .. && yarn && pod install
    
     echo "🎯 Stage: Post-clone is done .... "
    
     exit 0
    
  4. Inside your ci_pre_xcodebuild.sh file add this:

     #!/bin/zsh
    
     echo "🧩 Stage: PRE-Xcode Build is activated .... "
    
     # You can add additional scripts here...
    
     echo "🎯 Stage: PRE-Xcode Build is DONE .... "
    
     exit 0
    
  5. Inside your ci_post_xcodebuild.sh file add this:

     #!/bin/zsh
    
     echo "🧩 Stage: POST-Xcode Build is activated .... "
    
     # You can add additional scripts here...
    
     echo "🎯 Stage: POST-Xcode Build is DONE .... "
    
     exit 0
    

Upvotes: 40

Özgür BAYRAM
Özgür BAYRAM

Reputation: 103

In my case problem was about cocoapods. I removed old versions,installed from ground and linked, problem solved :)

brew uninstall --cask cocoapods

brew install cocoapods

brew link --overwrite cocoapods

Upvotes: 3

Paul Maltsev
Paul Maltsev

Reputation: 521

This can happen when you merge project.pbxproj with changes that are not in your branch. The solution is:

  • To undo the merge commit.
  • Remove this file from the commit.
  • Commit again.

In some cases, you will need more specific manipulations like @BEK ROZ mentioned before.

Upvotes: -1

Diogo Ribeiro
Diogo Ribeiro

Reputation: 291

In my case I run pod install inside /ios folder and worked

Upvotes: 29

PricipledPrimate
PricipledPrimate

Reputation: 1

I've had this same issue recently, there is now a default workflow for xcode cloud that performs the post clone step that was provided by @BEK ROZ

I also had the same issue locally when building a VueJS app with Ionic/Capacitor

Before now my knowledge of iOS builds is precisely zero, so excuse innocence, but I found the issues were relating to the *xcconfig files. Every capacitor module that you install with npm will have it's own xcconfig file for debug and release - Stored in:

ios/App/Pods/Target Support Files/{{ Module Name }}/{{ Module Name }}.debug.xcconfig

ios/App/Pods/Target Support Files/{{ Module Name }}/{{ Module Name }}.release.xcconfig

I've only installed two plugins, so I uninstalled one of them, which was cordova-plugin-screen-orientation, synced and then archived (steps below) and this time it passed.

# Remove a capacitor module with npm e.g. cordova-plugin-screen-orientation
npm uninstall cordova-plugin-screen-orientation

# Sync the iOS plugins to remove the plugin from your Podfile (ios/App/Podfile)
npx cap sync ios

So I'd recommend going through all of the plugins you've installed and see if any of them are playing up. Then go back to xcode, run "Product -> Archive" from the menus to start a new build or push your changes and let xcode cloud do the heavy lifting for you.

Good luck

Upvotes: 0

Related Questions