Nikola
Nikola

Reputation: 15048

Command PhaseScriptExecution failed with a nonzero exit code in an Ionic Capacitor app

While building the same Ionic app in a time difference of an hour or two, Xcode started refusing to build the app. I haven't changed anything, even to a git commit from a day before.

I get the same error saying PhaseScriptExecution failed with a nonzero exit code.

Error Output:

PhaseScriptExecution [CP]\\ Embed\\ Pods\\ Frameworks /Users/leme/Library/Developer/Xcode/DerivedData/App-fctulncwcthwvdawpviihiqllbid/Build/Intermediates.noindex/App.build/Debug-iphonesimulator/App.build/Script-9592DBEFFC6D2A0C8D5DEB22.sh (in target 'App' from project 'App')
cd /Users/leme/myApp/ios/App
/bin/sh -c /Users/leme/Library/Developer/Xcode/DerivedData/App-fctulncwcthwvdawpviihiqllbid/Build/Intermediates.noindex/App.build/Debug-iphonesimulator/App.build/Script-9592DBEFFC6D2A0C8D5DEB22.sh
mkdir -p /Users/leme/Library/Developer/Xcode/DerivedData/App-fctulncwcthwvdawpviihiqllbid/Build/Products/Debug-iphonesimulator/App.app/Frameworks
rsync --delete -av --filter P .*.?????? --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "/Users/leme/Library/Developer/Xcode/DerivedData/App-fctulncwcthwvdawpviihiqllbid/Build/Products/Debug-iphonesimulator/Branch/Branch.framework" "/Users/leme/Library/Developer/Xcode/DerivedData/App-fctulncwcthwvdawpviihiqllbid/Build/Products/Debug-iphonesimulator/App.app/Frameworks"
building file list ... done
Branch.framework/
Branch.framework/Branch
Branch.framework/Info.plist
Branch.framework/_CodeSignature/
Branch.framework/_CodeSignature/CodeResources
sent 1398204 bytes received 98 bytes 2796604.00 bytes/sec
total size is 1397692 speedup is 1.00
/Users/leme/myApp/ios/App/Pods/Target Support Files/Pods-App/Pods-App-frameworks.sh: line 131: ARCHS[@]: unbound variable
Command PhaseScriptExecution failed with a nonzero exit code

Xcode also returns warning about this same thing, you can see the screenshot here about it complaining about architectures:

enter image description here

But in the app settings, the architecture is set to $(ARCHS_STANDARD)

enter image description here

My XCode version is 11.6 (11E708)

I tried multiple things:

I haven't yet tried to update XCode to 12, but besides that, I'm running out of ideas, so any push in the right direction will be great.

Upvotes: 0

Views: 1025

Answers (1)

Nikola
Nikola

Reputation: 15048

OK, this is going to sound weird, but after updating to XCode12 I am no longer getting any errors and can build the app again 🤦

Upvotes: 0

Related Questions