Persistent Sandbox Denials When Building with Capacitor and CocoaPods in Xcode

I am a solo developer building a cross-platform voice assistant app using Capacitor (with HTML, JS) and Xcode for the iOS version. The app is called "Echo Eyes," and it already functions well as a Progressive Web App (PWA). However, the iOS build has been completely blocked due to persistent sandbox permission errors from macOS during the CocoaPods framework embedding phase.

This issue has caused severe disruption to my project and personal well-being, and I am writing to formally request assistance in identifying a clear solution. I am not a beginner and have followed all known best practices, forums, and Apple guidance without success.

What I’ve Built So Far:

Fully working PWA version of the app (voice input, HTML/JS interface)

Capacitor initialized with ID: com.echo.eyes.voice

Capacitor iOS platform added with CocoaPods

App runs fine until Xcode reaches: [CP] Embed Pods Frameworks

The Exact Problem:

Sandbox: bash(12319) deny(1) file-read-data /Users/Shared/projects/Echo_Mobile/ios/App/Pods/Target Support Files/Pods-App/Pods-App-frameworks.sh Command PhaseScriptExecution failed with a nonzero exit code

Clarification: This is not an HTML/JS issue. The failure occurs in Xcode long before web assets are embedded into the bundle. The shell script /Pods-App-frameworks.sh cannot be read due to macOS sandbox restrictions.

Everything I’ve Tried:

Gave Xcode and Terminal Full Disk Access

Ran: sudo xattr -rd com.apple.quarantine <project path> on the entire Pods directory

Added /bin/bash and /bin/sh to Full Disk Access (after confirming the exact shell via $SHELL)

Attempted to disable Gatekeeper via Terminal: sudo spctl --master-disable (confirmed not effective without GUI toggle)

Tried relocating project to /Users/Shared/projects/

Cleaned build folder, removed derived data, reinstalled pods

Debugged shell usage with: echo "▶️ Embedding under shell: $SHELL" in the [CP] Embed Pods Frameworks script

Attempted to grant shell access to Documents Folder, Desktop, and more via Files & Folders

Current State: Despite following all known and recommended steps, Xcode continues to return the same sandbox error. The shell script that embeds the CocoaPod frameworks is denied permission to read its own contents by macOS.

What I Am Asking For:

Is this a known issue in current versions of macOS or Xcode regarding sandbox denial for shell execution inside Pods?

Is there a recommended method to grant /bin/bash or /bin/sh permission to read and run these scripts under Xcode without compromising system security?

Is moving the project outside /Users (e.g. to /Projects) the only real workaround?

Are there official Apple workarounds or entitlements available for developers encountering this?

Personal Note: This issue has caused significant emotional and physical distress. I’m building this app as a personal healing tool and companion. I’ve poured months of work into this and done everything I can to follow Apple’s development guidelines.

I’m not asking for hand-holding — only a clear, respectful response confirming whether this is expected behavior and what can be done to resolve it.

Thank you for your time and understanding.

Persistent Sandbox Denials When Building with Capacitor and CocoaPods in Xcode
 
 
Q