title: M1 "Command ValidateEmbeddedBinary failed with a nonzero exit code" Archiving Error in Xcode
body: <p>I upgraded from macOS Catalina (10.15.7) to Big Sur (11.5.1) going from an Intel i7 MacBook Pro to an M1 iMac subsequently upgrading to Xcode 12.5.1 from 12.4</p>
  <p>The iOS app will compile and run on a device -- as well as a simulator. However if I try to Archive I get the titular error of this post. The error sort of references an Info.plist or the Watch app but is it cryptic and not that specific. I suspect it's something to do with my companion watch app.</p>
  <pre><code>ValidateEmbeddedBinary /Users/$USER/Library/Developer/Xcode/DerivedData/$PROJ-hkuuspnqxnzkxfdjlwwluxskiqbs/Build/Intermediates.noindex/ArchiveIntermediates/Watch/BuildProductsPath/Release-iphoneos/$PROJ.app/Watch/Watch.app (in target '$PROJ' from project '$PROJ')
  cd /Users/$USER/Documents/$PROJ/$PROJ/Applications/Xcode.app/Contents/Developer/usr/bin/embeddedBinaryValidationUtility /Users/$USER/Library/Developer/Xcode/DerivedData/$PROJ-hkuuspnqxnzkxfdjlwwluxskiqbs/Build/Intermediates.noindex/ArchiveIntermediates/$PROJ/BuildProductsPath/Release-iphoneos/$PROJ.app/Watch/Watch.app -signing-cert 0B2269280E4CC1330AD714C0EC8A51DF24A35DB9 -info-plist-path /Users/$USER/Library/Developer/Xcode/DerivedData/$PROJ-hkuuspnqxnzkxfdjlwwluxskiqbs/Build/Intermediates.noindex/ArchiveIntermediates/$PROJ/InstallationBuildProductsLocation/Applications/$PROJ.app/Info.plist
  </code></pre>
  <p>I have managed to get it to Archive twice -- seemingly after making big changes at the project level. Once I embedded a framework and it archived -- then I added an entitlements file and added a line to point to it in the xcproject.pbxproj file. Producing a minimal working example of this will be tricky as I suspect it's a race condition in bigger projects.</p>