Running ci_post_xcodebuild.sh script failed (exited with code 26). Executable scripts are run using the interpreter specified in the shebang line.

Generated on 8/13/2024

1 search

It seems like you're encountering an issue with a script in your Xcode Cloud workflow. Based on the context from the WWDC session titled "Extend your Xcode Cloud workflows," here are some insights that might help you troubleshoot the problem:

  1. Script Execution: Ensure that your script is placed in the correct folder, named CI scripts, at the root of your project. The filename should indicate when the script should run, such as ci_post_xcodebuild.sh for after the Xcode build process.

  2. Environment Variables: Make sure that your script correctly utilizes environment variables provided by Xcode Cloud. You can find a list of these variables in the environment variable reference page in the documentation.

  3. Error Handling: The session mentions using the set -e shell option to make the script exit immediately if it encounters an error. This is useful for stopping the workflow if something goes wrong, but it also means that any non-zero exit code will halt the process. Check your script for any commands that might be returning a non-zero exit code.

  4. Network Configuration: If your script involves network operations, ensure that Xcode Cloud can communicate with your server. This might involve configuring your server's firewall to allow connections from the IP address ranges used by Xcode Cloud.

  5. Manual Start Conditions: If your workflow is triggered manually, ensure that the start conditions are correctly set up to match the branch or reference you're building.

For more detailed guidance, you might want to refer to the session Extend your Xcode Cloud workflows (09:35) where they discuss custom scripts and error handling in Xcode Cloud workflows.