'flutter swift Command PhaseScriptExecution failed with a nonzero exit code
When i want to make archive to upload app on apple Store in the end of archive i get this error /bin/sh -c /Users/aneeq/Library/Developer/Xcode/DerivedData/Runner-hfzveethzxphozduylnhsnbtzzct/Build/Intermediates.noindex/ArchiveIntermediates/Runner/IntermediateBuildFilesPath/Runner.build/Release-iphoneos/Runner.build/Script-9740EEB61CF901F6004384FC.sh
and also this waring
None of the architectures in ARCHS (arm64) are valid. Consider setting ARCHS to $(ARCHS_STANDARD) or updating it to include at least one value from VALID_ARCHS (x86_64).
can someone kindly help me with this and also its run fine on emulator.
Its flutter Application not Native.
Solution 1:[1]
Could you indicate which is your version of MacOS and Xcode? Generally that can be a problem that you do not have the most recent version of MacOS and Xcode, you can try updating or checking if you have any update, then check if you have your linked libraries correctly
Solution 2:[2]
Solution 3:[3]
I see many people experiencing this problem - and many different possible solutions. For me, I had accidentally messed with the certificates in Keychain Access. To fix, I deleted those, signed out of my account in Xcode (preferences), and then signed back in. Then in signing and capabilities, I'd select my account, Xcode would prompt me to revoke the old certificates (no longer found) and then create a brand new set. Then my app would build.
Solution 4:[4]
For me, clean derived data was required.
~/Library/Developer/Xcode/DerivedData
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | rxDVZ |
| Solution 2 | Vettiyanakan |
| Solution 3 | DJSjr |
| Solution 4 | maddy |

