title: Xcode 12: Command PhaseScriptExecution failed with a nonzero exit code
body: <p>I have a flutter application that I am trying to generate release for IOS out of it, but I am facing this error:</p>
  <pre><code> sent 29 bytes  received 20 bytes  98.00 bytes/sec
      total size is 0  speedup is 0.00
      rsync error: some files could not be transferred (code 23) at /AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/rsync/rsync-54.120.1/rsync/main.c(996) [sender=2.6.9]
      Command PhaseScriptExecution failed with a nonzero exit code
      note: Using new build system
      note: Building targets in parallel
      note: Planning build
      note: Constructing build description 
  </code></pre>
  <p>I have tried most of the internet solutions for this error and still get it the same, I am not sure if it is related to something specific or it is a general error, any suggestion would be highly appreciated</p>
  <pre><code>flutter build ios --verbose 
  </code></pre>
  <p>here is the log:</p>
  <pre><code>/Users/husseinajam/Library/Developer/Xcode/DerivedData/Runner-blmaktiwmbrumnfrwrxbcbrwqoqk/Build/Intermediates.noindex/Runner.build/Release-
                              iphoneos/Runner.build/Script-3B06AD1E1E4923F5004D2608.sh
                          ♦ mkdir -p -- /Users/husseinajam/Desktop/imim/build/ios/Release-iphoneos/Runner.app/Frameworks
                          ♦ rsync -av --delete /Users/husseinajam/Desktop/imim/ios/../ios/Flutter/App.framework
                          /Users/husseinajam/Desktop/imim/build/ios/Release-iphoneos/Runner.app/Frameworks
                          building file list ... rsync: link_stat &quot;/Users/husseinajam/Desktop/imim/ios/../ios/Flutter/App.framework&quot;
  failed: No such file
                          or directory (2)
                          done
                      
                          sent 29 bytes  received 20 bytes  98.00 bytes/sec
                          total size is 0  speedup is 0.00
                          rsync error: some files could not be transferred (code 23) at
                          /AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/rsync/rsync-54.120.1/rsync/main.c(996) [sender=2.6.9]
                          Command PhaseScriptExecution failed with a nonzero exit code
                      
                          GenerateDSYMFile /Users/husseinajam/Desktop/imim/build/ios/Release-iphoneos/Runner.app.dSYM
                          /Users/husseinajam/Desktop/imim/build/ios/Release-iphoneos/Runner.app/Runner (in target 'Runner' from project
  'Runner')
                              cd /Users/husseinajam/Desktop/imim/ios
                              /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil
                              /Users/husseinajam/Desktop/imim/build/ios/Release-iphoneos/Runner.app/Runner -o
                              /Users/husseinajam/Desktop/imim/build/ios/Release-iphoneos/Runner.app.dSYM
                      
                      
  [+8613 ms] &quot;flutter ios&quot; took 118,982ms.
  [   +5 ms] Encountered error while building for device.
  [   +2 ms] 
             #0      throwToolExit (package:flutter_tools/src/base/common.dart:14:3)
             #1      BuildIOSCommand.runCommand (package:flutter_tools/src/commands/build_ios.dart:116:7)
             &lt;asynchronous suspension&gt;
             #2      FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:977:18)
             #3      _rootRunUnary (dart:async/zone.dart:1198:47)
             #4      _CustomZone.runUnary (dart:async/zone.dart:1100:19)
             #5      _FutureListener.handleValue (dart:async/future_impl.dart:143:18)
             #6      Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
             #7      Future._propagateToListeners (dart:async/future_impl.dart:725:32)
             #8      Future._completeWithValue (dart:async/future_impl.dart:529:5)
             #9      Future._asyncCompleteWithValue.&lt;anonymous closure&gt; (dart:async/future_impl.dart:567:7)
             #10     _rootRun (dart:async/zone.dart:1190:13)
             #11     _CustomZone.run (dart:async/zone.dart:1093:19)
             #12     _CustomZone.runGuarded (dart:async/zone.dart:997:7)
             #13     _CustomZone.bindCallbackGuarded.&lt;anonymous closure&gt; (dart:async/zone.dart:1037:23)
             #14     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
             #15     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
             #16     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:118:13)
             #17     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:169:5)
             
             
  [ +744 ms] ensureAnalyticsSent: 257ms
  [   +2 ms] Running shutdown hooks
  [        ] Shutdown hook priority 4
  [   +1 ms] Shutdown hooks complete
  [        ] exiting with code 1
  </code></pre>